fix: set gtest_force_shared_crt in tests (#4033)

This commit is contained in:
nerix 2022-10-01 20:46:59 +02:00 committed by GitHub
parent ba586f01d0
commit 2deed8e1cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -104,6 +104,10 @@ find_package(RapidJSON REQUIRED)
find_package(Websocketpp REQUIRED)
if (BUILD_TESTS)
# For MSVC: Prevent overriding the parent project's compiler/linker settings
# See https://github.com/google/googletest/blob/main/googletest/README.md#visual-studio-dynamic-vs-static-runtimes
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/lib/googletest" "lib/googletest")
mark_as_advanced(