Skip to content

Commit

Permalink
Do not link against several transitive dependencies of HDF5
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Dec 5, 2023
1 parent 8b98988 commit 3b32354
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmake/FindMOAB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ include(${MOAB_CMAKE_CONFIG})
set(ENV{PATH} "${HDF5_DIR}:$ENV{PATH}")
set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX})
find_package(HDF5 REQUIRED)
# Remove HDF5 transitive dependencies that are system libraries
list(FILTER HDF5_LIBRARIES EXCLUDE REGEX ".*lib(pthread|dl|m).*")
set(HDF5_LIBRARIES_SHARED ${HDF5_LIBRARIES})
# CMake doesn't let you find_package(HDF5) twice so we have to do this instead
if (BUILD_STATIC_LIBS)
Expand Down

0 comments on commit 3b32354

Please sign in to comment.