diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-10-04 16:10:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 16:10:34 (GMT) |
commit | 7b18845e9c24cc0d910fa082d3f5c7c92797396d (patch) | |
tree | b9a6ed968b3ec24ff1681915037703ed00212a97 | |
parent | 51ff48b8873d584811f4cad83c19f1edf484b7e4 (diff) | |
download | hdf5-7b18845e9c24cc0d910fa082d3f5c7c92797396d.zip hdf5-7b18845e9c24cc0d910fa082d3f5c7c92797396d.tar.gz hdf5-7b18845e9c24cc0d910fa082d3f5c7c92797396d.tar.bz2 |
Disable static + thread-safe on Windows w/ CMake (#3622) (#3630)
-rw-r--r-- | .github/workflows/main.yml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 5 | ||||
-rw-r--r-- | release_docs/RELEASE.txt | 14 |
3 files changed, 15 insertions, 6 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4093551..9944784 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -558,6 +558,7 @@ jobs: if: (matrix.generator != 'autogen') && ! (matrix.thread_safety.enabled) + # NOTE: Windows does not support static + thread-safe - name: CMake Configure (Thread-Safe) run: | mkdir "${{ runner.workspace }}/build" @@ -567,6 +568,7 @@ jobs: -DCMAKE_BUILD_TYPE=${{ matrix.build_mode.cmake }} \ -DCMAKE_TOOLCHAIN_FILE=${{ matrix.toolchain }} \ -DBUILD_SHARED_LIBS=ON \ + -DBUILD_STATIC_LIBS=OFF \ -DHDF5_ENABLE_ALL_WARNINGS=ON \ -DHDF5_ENABLE_THREADSAFE:BOOL=ON \ -DHDF5_ENABLE_PARALLEL:BOOL=${{ matrix.parallel }} \ diff --git a/CMakeLists.txt b/CMakeLists.txt index ebd45c8..da12dd3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -863,8 +863,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) diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index a0a5dae..57e8189 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -47,7 +47,16 @@ New Features Configuration: ------------- - - + - Thread-safety + static library disabled on Windows w/ CMake + + The thread-safety feature requires hooks in DllMain(), which is only + present in the shared library. + + We previously just warned about this, but now any CMake configuration + that tries to build thread-safety and the static library will fail. + This cannot be overridden with ALLOW_UNSUPPORTED. + + Fixes GitHub issue #3613 Library: @@ -62,9 +71,6 @@ New Features Fortran Library: ---------------- - - - - - Removed "-commons" linking option on Darwin, as COMMON and EQUIVALENCE are no longer used in the Fortran source. |