summaryrefslogtreecommitdiffstats
path: root/googletest/cmake
diff options
context:
space:
mode:
authorHugo Lindström <hugo.lindstrom@trimble.se>2019-01-28 20:07:41 (GMT)
committerHugo Lindström <hugo.lindstrom@trimble.se>2019-01-28 20:07:41 (GMT)
commit718bb65acff116074eaafcaeb57600952ea61def (patch)
tree44f82d4eda56f26b69413460a64a420878fa6037 /googletest/cmake
parent5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081 (diff)
downloadgoogletest-718bb65acff116074eaafcaeb57600952ea61def.zip
googletest-718bb65acff116074eaafcaeb57600952ea61def.tar.gz
googletest-718bb65acff116074eaafcaeb57600952ea61def.tar.bz2
Avoid dynamic/static runtime linking (LNK4098) by properly replacing MD(d)->MT(d) in both C and CXX flags, resolves 2074refs/pull/2086/head
Diffstat (limited to 'googletest/cmake')
-rw-r--r--googletest/cmake/internal_utils.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 99725b7..489223a 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -22,6 +22,8 @@ macro(fix_default_compiler_settings_)
# This replacement code is taken from sample in the CMake Wiki at
# https://gitlab.kitware.com/cmake/community/wikis/FAQ#dynamic-replace.
foreach (flag_var
+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)