Skip to content

Commit

Permalink
Use shared (DLL) run-time lib even when Google Test is built as stati…
Browse files Browse the repository at this point in the history
…c lib

Signed-off-by: Fabian Sauter <[email protected]>
  • Loading branch information
COM8 committed Jul 28, 2022
1 parent 53a3753 commit d1a80de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ if(KOMPUTE_OPT_BUILD_TESTS)
if(KOMPUTE_OPT_USE_BUILT_IN_GOOGLE_TEST)
FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.11.0) # Source: https://github.com/google/googletest/releases

# Use a shared C runtime in case we build shared
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)

add_library(gtest_int INTERFACE)
Expand Down

0 comments on commit d1a80de

Please sign in to comment.