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 @@ -19,9 +19,7 @@ else ()
1919 endif ()
2020 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" )
2121
22- # For Windows: Prevent overriding the parent project's compiler/linker settings
23- set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
24- set (BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE) # Ensure GoogleTest is static (default)
22+ et(GTEST_CREATE_SHARED_LIBRARY ON CACHE BOOL "Build GoogleTest as a shared library" )
2523
2624 # fetch testing framework GoogleTest
2725 include (FetchContent)
@@ -32,6 +30,8 @@ else ()
3230 GIT_SHALLOW TRUE
3331 QUIET
3432 )
33+ # For Windows: Prevent overriding the parent project's compiler/linker settings
34+ set (gtest_force_shared_crt ON CACHE BOOL "" FORCE)
3535 FetchContent_MakeAvailable(googletest)
3636 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_OLD} " )
3737endif ()
You can’t perform that action at this time.
0 commit comments