Introduces gtest_force_shared_crt option for CMake build scripts.

This commit is contained in:
vladlosev
2010-05-18 21:08:05 +00:00
parent 55d166a222
commit c828e17175
2 changed files with 8 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ macro(fix_default_settings)
foreach (flag_var
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if (NOT BUILD_SHARED_LIBS)
if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)
# When Google Test is built as a shared library, it should also use
# shared runtime libraries. Otherwise, it may end up with multiple
# copies of runtime library data in different modules, resulting in