Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable static + thread-safe on Windows w/ CMake (#3622) #3631

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,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"
Expand All @@ -464,6 +465,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 }} \
Expand Down
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions release_docs/RELEASE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ 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

- Bumped the minimum required version of Autoconf to 2.71.

This fixes a problem with the Intel oneAPI Fortran compiler's -loopopt
Expand Down