Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake check for parallel and threadsafe redo #41

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,19 @@ endif()

include(CheckSymbolExists)
list(APPEND CMAKE_REQUIRED_INCLUDES ${HDF5_INCLUDE_DIRS})
check_symbol_exists(H5_HAVE_PARALLEL "H5pubconf.h" HDF5_HAVE_PARALLEL)
if(NOT HDF5_HAVE_PARALLEL)
message(FATAL_ERROR "HDF5 library needs to enable parallel support.")
if(NOT HDF5_IS_PARALLEL)
check_symbol_exists(H5_HAVE_PARALLEL "H5pubconf.h" HDF5_HAVE_PARALLEL)
if(NOT HDF5_HAVE_PARALLEL)
message(FATAL_ERROR "HDF5 library needs to enable parallel support.")
endif()
endif()

check_symbol_exists(H5_HAVE_THREADSAFE "H5pubconf.h" HDF5_HAVE_THREADSAFE)
if(NOT HDF5_HAVE_THREADSAFE)
message(FATAL_ERROR "HDF5 library needs to enable threadsafe support.")
endif()
# Comment out until H5_IS_THREADSAFE is added as a CMake variable. Otherwise,
# this may fail when fetch content is used in VOL testing with HDF5 actions.
#check_symbol_exists(H5_HAVE_THREADSAFE "H5pubconf.h" HDF5_HAVE_THREADSAFE)
#if(NOT HDF5_HAVE_THREADSAFE)
# message(FATAL_ERROR "HDF5 library needs to enable threadsafe support.")
#endif()

# Check if HDF5 version is 1.14 or greater
if(HDF5_FOUND)
Expand Down
Loading