summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2021-03-25 07:32:40 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2021-03-25 07:32:40 (GMT)
commit1dbb83aabd9404f4b626e19193b7472a653ed8f5 (patch)
tree8ad3409e9bc2977486d5137240381d719587bc0a /config/cmake
parent711d12bb586b23d5bdea4f57fe0101255324cc78 (diff)
downloadhdf5-1dbb83aabd9404f4b626e19193b7472a653ed8f5.zip
hdf5-1dbb83aabd9404f4b626e19193b7472a653ed8f5.tar.gz
hdf5-1dbb83aabd9404f4b626e19193b7472a653ed8f5.tar.bz2
Brings file locking changes from develop
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/ConfigureChecks.cmake25
-rw-r--r--config/cmake/H5pubconf.h.in6
-rw-r--r--config/cmake/libhdf5.settings.cmake.in1
-rw-r--r--config/cmake/scripts/HDF5config.cmake2
4 files changed, 33 insertions, 1 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 4805eeb..4e31b38 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -61,6 +61,31 @@ if (HDF5_ENABLE_CODESTACK)
endif ()
MARK_AS_ADVANCED (HDF5_ENABLE_CODESTACK)
+# ----------------------------------------------------------------------
+# Check if they would like to use file locking by default
+#-----------------------------------------------------------------------------
+option (HDF5_USE_FILE_LOCKING "Use file locking by default (mainly for SWMR)" ON)
+if (HDF5_USE_FILE_LOCKING)
+ set (${HDF_PREFIX}_USE_FILE_LOCKING 1)
+endif ()
+
+# ----------------------------------------------------------------------
+# Check if they would like to ignore file locks when disabled on a file system
+#-----------------------------------------------------------------------------
+option (HDF5_IGNORE_DISABLED_FILE_LOCKS "Ignore file locks when disabled on file system" ON)
+if (HDF5_IGNORE_DISABLED_FILE_LOCKS)
+ set (${HDF_PREFIX}_IGNORE_DISABLED_FILE_LOCKS 1)
+endif ()
+
+# Set the libhdf5.settings file variable
+if (HDF5_IGNORE_DISABLED_FILE_LOCKS AND HDF5_USE_FILE_LOCKING)
+ set (HDF5_FILE_LOCKING_SETTING "best-effort")
+elseif (HDF5_IGNORE_DISABLED_FILE_LOCKS)
+ set (HDF5_FILE_LOCKING_SETTING "yes")
+else ()
+ set (HDF5_FILE_LOCKING_SETTING "no")
+endif ()
+
#-----------------------------------------------------------------------------
# Are we going to use HSIZE_T
#-----------------------------------------------------------------------------
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index f9e9f10..62cfcab 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -495,6 +495,9 @@
/* Define if the compiler understands __inline__ */
#cmakedefine H5_HAVE___INLINE__ @H5_HAVE___INLINE__@
+/* Define if the library will ignore file locks when disabled */
+#cmakedefine H5_IGNORE_DISABLED_FILE_LOCKS @H5_IGNORE_DISABLED_FILE_LOCKS@
+
/* Define if the high-level library headers should be included in hdf5.h */
#cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@
@@ -735,6 +738,9 @@
/* Define using v1.14 public API symbols by default */
#cmakedefine H5_USE_114_API_DEFAULT @H5_USE_114_API_DEFAULT@
+/* Define if the library will use file locking */
+#cmakedefine H5_USE_FILE_LOCKING @H5_USE_FILE_LOCKING@
+
/* Define if a memory checking tool will be used on the library, to cause
library to be very picky about memory operations and also disable the
internal free list manager code. */
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index b745765..ebcbd61 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -85,5 +85,6 @@ Parallel Filtered Dataset Writes: @PARALLEL_FILTERED_WRITES@
Using memory checker: @HDF5_ENABLE_USING_MEMCHECKER@
Memory allocation sanity checks: @HDF5_MEMORY_ALLOC_SANITY_CHECK@
Function Stack Tracing: @HDF5_ENABLE_CODESTACK@
+ Use file locking: @HDF5_FILE_LOCKING_SETTING@
Strict File Format Checks: @HDF5_STRICT_FORMAT_CHECKS@
Optimization Instrumentation: @HDF5_Enable_Instrument@
diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake
index bd48588..7005d3a 100644
--- a/config/cmake/scripts/HDF5config.cmake
+++ b/config/cmake/scripts/HDF5config.cmake
@@ -199,7 +199,7 @@ endif ()
#set (LOCAL_NO_PACKAGE "TRUE")
##### Following controls source update #####
#set (LOCAL_UPDATE "TRUE")
-set (REPOSITORY_URL "https://git@bitbucket.hdfgroup.org/scm/hdffv/hdf5.git")
+set (REPOSITORY_URL "https://github.com/HDFGroup/hdf5.git")
set (REPOSITORY_BRANCH "develop")
#uncomment to use a compressed source file: *.tar on linux or mac *.zip on windows