File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,19 @@ if(BUILD_TESTING)
1616 if (NOT TARGET gtest_main)
1717 message (STATUS "Dependency: googletest (BUILD_TESTING=${BUILD_TESTING} )" )
1818
19+ if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "MSVC" )
20+ # All the libraries in the build must use either /MD or /MT (runtime
21+ # library to link)
22+ #
23+ # force this option to ON so that Google Test will use /MD instead of /MT
24+ # /MD is now the default for Visual Studio, so it should be our default,
25+ # too
26+ option (
27+ gtest_force_shared_crt
28+ "Use shared (DLL) run-time lib even when Google Test is built as static lib."
29+ ON )
30+ endif ()
31+
1932 configure_file (${CMAKE_CURRENT_SOURCE_DIR} /cmake/googletest.CMakeLists.txt
2033 ${CMAKE_BINARY_DIR} /googletest-download/CMakeLists.txt )
2134 execute_process (COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR} " .
You can’t perform that action at this time.
0 commit comments