diff --git a/.github/workflows/msys.yml b/.github/workflows/msys.yml index 083ea8405bf..cf357dd1d5f 100644 --- a/.github/workflows/msys.yml +++ b/.github/workflows/msys.yml @@ -81,7 +81,7 @@ jobs: unset VCPKG_ROOT mkdir build cd build - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -DCMAKE_CXX_FLAGS="-undefined dynamic_lookup" .. + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_BENCHMARKS=OFF .. ninja - name: "Clean up runner" diff --git a/CMakeLists.txt b/CMakeLists.txt index 59131fac4f8..60920bc1986 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,7 +266,12 @@ endif() # Bundled third party libraries add_subdirectory(third_party) # Third-party tools and libraries +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS} -undefined dynamic_lookup") +endif() +set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) if(MSVC) + message(STATUS "MSVC") if(BUILD_SHARED_LIBS) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE) else()