diff options
author | Jan-Willem Blokland <Jan-Willem.Blokland@Shell.com> | 2023-07-24 19:43:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 19:43:43 (GMT) |
commit | 8853687933073ae0edb8ca586a01db80cf3c9d6c (patch) | |
tree | d71913e0471e3496c2f2b66f37c406eb1f04bfd1 /config | |
parent | fe7e027db6c2905008332567abbf84ea6e584d88 (diff) | |
download | hdf5-8853687933073ae0edb8ca586a01db80cf3c9d6c.zip hdf5-8853687933073ae0edb8ca586a01db80cf3c9d6c.tar.gz hdf5-8853687933073ae0edb8ca586a01db80cf3c9d6c.tar.bz2 |
CMake: (fix) Threads dependency (#3267)
- 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.
Diffstat (limited to 'config')
-rw-r--r-- | config/cmake/hdf5-config.cmake.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index 0f1467d..fa5bfcb 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -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-@HDF5_VERSION_STRING@.jar |