Skip to content

Commit

Permalink
Do not link against several transitive dependencies of HDF5 (openmc-d…
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano authored and church89 committed Jul 18, 2024
1 parent 1cf1d6a commit a93a969
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ if(NOT DEFINED HDF5_PREFER_PARALLEL)
endif()

find_package(HDF5 REQUIRED COMPONENTS C HL)

# Remove HDF5 transitive dependencies that are system libraries
list(FILTER HDF5_LIBRARIES EXCLUDE REGEX ".*lib(pthread|dl|m).*")
message(STATUS "HDF5 Libraries: ${HDF5_LIBRARIES}")

if(HDF5_IS_PARALLEL)
if(NOT OPENMC_USE_MPI)
message(FATAL_ERROR "Parallel HDF5 was detected, but MPI was not enabled.\
Expand Down

0 comments on commit a93a969

Please sign in to comment.