aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/cmake
diff options
context:
space:
mode:
authorWojciech Kaluza <wojkaluza@gmail.com>2018-05-26 01:40:06 +0100
committerWojciech Kaluza <w-kaluza@tlen.pl>2018-07-11 22:54:05 +0100
commit421e7b4f29fc761c66d2773a1fc318a738a6d3da (patch)
tree3aca724e9d7d42dbb620cac03b9fc25de19e0284 /googletest/cmake
parent41f0e24335d8874cc87420a6349bb1844e2a15de (diff)
downloadgoogletest-421e7b4f29fc761c66d2773a1fc318a738a6d3da.tar.gz
googletest-421e7b4f29fc761c66d2773a1fc318a738a6d3da.tar.bz2
googletest-421e7b4f29fc761c66d2773a1fc318a738a6d3da.zip
Remove default /EHsc compiler flag
This prevents warning D9025 (one command-line option overrides another) on MSVC builds: some test targets are built with the /EHs-c- which conflicts with /EHsc.
Diffstat (limited to 'googletest/cmake')
-rw-r--r--googletest/cmake/internal_utils.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake
index 6448918f..3a9b5bc4 100644
--- a/googletest/cmake/internal_utils.cmake
+++ b/googletest/cmake/internal_utils.cmake
@@ -38,6 +38,11 @@ macro(fix_default_compiler_settings_)
# We prefer more strict warning checking for building Google Test.
# Replaces /W3 with /W4 in defaults.
string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}")
+
+ # Prevent D9025 warning for targets that have exception handling
+ # turned off (/EHs-c- flag). Where required, exceptions are explicitly
+ # re-enabled using the cxx_exception_flags variable.
+ string(REPLACE "/EHsc" "" ${flag_var} "${${flag_var}}")
endforeach()
endif()
endmacro()