summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-10-04 16:10:57 (GMT)
committerGitHub <noreply@github.com>2023-10-04 16:10:57 (GMT)
commitfc550202c28cea0ac2fd4a4182a6585fa01a0eca (patch)
tree194fdb2f815c67ca53565fdc12c8f92f8e03088f /CMakeLists.txt
parent069688c3faf01607a9a7a1ddb8f26961d8b993a7 (diff)
downloadhdf5-fc550202c28cea0ac2fd4a4182a6585fa01a0eca.zip
hdf5-fc550202c28cea0ac2fd4a4182a6585fa01a0eca.tar.gz
hdf5-fc550202c28cea0ac2fd4a4182a6585fa01a0eca.tar.bz2
Disable static + thread-safe on Windows w/ CMake (#3622) (#3631)
* Disable static + thread-safe on Windows w/ CMake (#3622) The thread-safety feature on Windows requires a hook in DllMain() and thus is only available when HDF5 is built as a shared library. This was previously a warning, but has now been elevated to a fatal error that cannot be overridden with ALLOW_UNSUPPORTED. Fixes GitHub #3613
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 2 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28fe23d..ad2c9d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -820,9 +820,8 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
if (WIN32)
- if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.0")
- message (VERBOSE " **** thread-safety option not supported with static library **** ")
- message (VERBOSE " **** thread-safety option will not be used building static library **** ")
+ if (BUILD_STATIC_LIBS)
+ message (FATAL_ERROR " **** thread-safety option not supported with static library **** ")
endif ()
endif ()
if (HDF5_ENABLE_PARALLEL)