diff options
author | Wojciech Kaluza <wojkaluza@gmail.com> | 2018-05-26 00:40:06 (GMT) |
---|---|---|
committer | Wojciech Kaluza <w-kaluza@tlen.pl> | 2018-07-11 21:54:05 (GMT) |
commit | 421e7b4f29fc761c66d2773a1fc318a738a6d3da (patch) | |
tree | 3aca724e9d7d42dbb620cac03b9fc25de19e0284 /googletest/cmake | |
parent | 41f0e24335d8874cc87420a6349bb1844e2a15de (diff) | |
download | googletest-421e7b4f29fc761c66d2773a1fc318a738a6d3da.zip googletest-421e7b4f29fc761c66d2773a1fc318a738a6d3da.tar.gz googletest-421e7b4f29fc761c66d2773a1fc318a738a6d3da.tar.bz2 |
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.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 6448918..3a9b5bc 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() |