Skip to content

Commit

Permalink
CMake: (fix) Threads dependency
Browse files Browse the repository at this point in the history
- If the HDF5 library has been build with either thread-safety or
  subfiling VFD feature on it will have an additional dependency
  on a threading library. This dependency has been added to the
  hdf-config.cmake.in file.
  • Loading branch information
jwsblokland committed Jul 21, 2023
1 parent 1706355 commit 83ff6ae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/cmake/hdf5-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ if (${HDF5_PACKAGE_NAME}_ENABLE_PARALLEL)
find_package(MPI QUIET REQUIRED)
endif ()

if (${HDF5_PACKAGE_NAME}_ENABLE_THREADSAFE OR ${HDF5_PACKAGE_NAME}_ENABLE_SUBFILING_VFD)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads QUIET REQUIRED)
endif ()

if (${HDF5_PACKAGE_NAME}_BUILD_JAVA)
set (${HDF5_PACKAGE_NAME}_JAVA_INCLUDE_DIRS
@PACKAGE_CURRENT_BUILD_DIR@/lib/jarhdf5-@[email protected]
Expand Down

0 comments on commit 83ff6ae

Please sign in to comment.