File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,7 @@ else ()
2121
2222 # For Windows: Prevent overriding the parent project's compiler/linker settings
2323 set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
24- set (BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) # Ensure GoogleTest is static (default)
25- set (GTEST_HAS_PTHREAD 0 CACHE BOOL "" FORCE) # Ensure no threading issues
24+ set (BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) # Ensure GoogleTest is static (default)
2625
2726 # fetch testing framework GoogleTest
2827 include (FetchContent)
@@ -307,8 +306,9 @@ endif ()
307306# fix shared library linker error on Windows
308307if (NOT GTEST_FOUND)
309308 foreach (target gmock gtest)
310- target_compile_definitions (${target} INTERFACE GTEST_LINKED_AS_SHARED_LIBRARY=0 )
309+ target_compile_definitions (${target} INTERFACE GTEST_LINKED_AS_SHARED_LIBRARY=1 )
311310 endforeach ()
311+ target_compile_definitions (${PLSSVM_BASE_TEST_LIBRARY_NAME} PUBLIC GTEST_LINKED_AS_SHARED_LIBRARY=1)
312312endif ()
313313
314314list (POP_BACK CMAKE_MESSAGE_INDENT)
You can’t perform that action at this time.
0 commit comments