summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-07-13 17:19:02 (GMT)
committerGitHub <noreply@github.com>2023-07-13 17:19:02 (GMT)
commit26059fc7abd51827d0e7a798fac1cfa7461db7d3 (patch)
treed429feaa8d22f72f7415330c895d2562f405e46d /CMakeLists.txt
parentb77d5bacea7f004153b2752a9cb17d26ae975cf9 (diff)
downloadhdf5-26059fc7abd51827d0e7a798fac1cfa7461db7d3.zip
hdf5-26059fc7abd51827d0e7a798fac1cfa7461db7d3.tar.gz
hdf5-26059fc7abd51827d0e7a798fac1cfa7461db7d3.tar.bz2
Subfiling VFD source cleanup (#3241)
* Subfiling VFD source cleanup Modularize Subfiling CMake code into separate CMakeLists.txt file Update Mercury util code to latest version and update Copyright Generate mercury_util_config.h header file instead of using pre-generated file Remove unnecessary Mercury functionality Fix minor warning in Subfiling VFD code * Remove Mercury headers from Autotools publicly-distributed header list
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 15 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26914b0..22512be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -760,8 +760,22 @@ if (HDF5_ENABLE_SUBFILING_VFD)
${HDF5_SRC_INCLUDE_DIRS}
${H5FD_SUBFILING_MERCURY_DIR}
)
- set (H5_HAVE_MERCURY_H 1)
set (CMAKE_REQUIRED_INCLUDES "${H5FD_SUBFILING_MERCURY_DIR}")
+
+ # Run some configure checks for the Mercury util files
+ set (CMAKE_EXTRA_INCLUDE_FILES pthread.h)
+ set (CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+
+ check_type_size(PTHREAD_MUTEX_ADAPTIVE_NP PTHREAD_MUTEX_ADAPTIVE_NP_SIZE)
+ if (HAVE_PTHREAD_MUTEX_ADAPTIVE_NP_SIZE)
+ set (${HDF_PREFIX}_HAVE_PTHREAD_MUTEX_ADAPTIVE_NP 1)
+ endif ()
+
+ check_symbol_exists(pthread_condattr_setclock pthread.h
+ ${HDF_PREFIX}_HAVE_PTHREAD_CONDATTR_SETCLOCK)
+
+ unset (CMAKE_EXTRA_INCLUDE_FILES)
+ unset (CMAKE_REQUIRED_LIBRARIES)
endif()
#option (DEFAULT_API_VERSION "Enable v1.14 API (v16, v18, v110, v112, v114)" "v114")