summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-10-03 23:37:44 (GMT)
committerGitHub <noreply@github.com>2023-10-03 23:37:44 (GMT)
commit447765609befbf16fcff471b2fda913c3e31432b (patch)
treec5fea55c32ffb29215b80361ccd8d0b987989ee6 /CMakeLists.txt
parentcb6de06dcc18b31ab3f1d53bd93f0bbfaa0a17e1 (diff)
downloadhdf5-447765609befbf16fcff471b2fda913c3e31432b.zip
hdf5-447765609befbf16fcff471b2fda913c3e31432b.tar.gz
hdf5-447765609befbf16fcff471b2fda913c3e31432b.tar.bz2
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, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da6a4d1..aa91dbe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -872,8 +872,9 @@ option (HDF5_ENABLE_THREADSAFE "Enable thread-safety" OFF)
if (HDF5_ENABLE_THREADSAFE)
# check for unsupported options
if (WIN32)
- 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_BUILD_FORTRAN)
if (NOT ALLOW_UNSUPPORTED)