Use shared (DLL) run-time lib even when Google Test is built as static lib

Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
This commit is contained in:
Fabian Sauter 2022-07-28 10:06:15 +02:00
parent 53a3753caf
commit d1a80ded02

View file

@ -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)