From 72312b64749b4f087fc30d513eb4a2f99ed1aaf5 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Thu, 16 Jan 2020 19:29:36 +0100 Subject: [PATCH 1/2] Revert "adding /EHsc for msvc cmake target gsl_test_config_noexcept" This reverts commit 3539bd8008ed872f63d3ca71319cf4e5abbfe6c9. --- tests/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5c93a9a..ef70547 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -135,7 +135,6 @@ add_library(gsl_tests_config_noexcept INTERFACE) if(MSVC) # MSVC or simulating MSVC target_compile_options(gsl_tests_config_noexcept INTERFACE ${GSL_CPLUSPLUS_OPT} - /EHsc /W4 /WX $<$: From 95730a80c4ddb0c565f5bb2e44fe1bf1d4acc971 Mon Sep 17 00:00:00 2001 From: Roelf-Jilling Date: Thu, 16 Jan 2020 19:10:02 +0100 Subject: [PATCH 2/2] Restore disabling of exceptions for Microsoft STL in "no exception tests" --- tests/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ef70547..1304688 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -133,6 +133,9 @@ endforeach(flag_var) # please try to keep entries ordered =) add_library(gsl_tests_config_noexcept INTERFACE) if(MSVC) # MSVC or simulating MSVC + target_compile_definitions(gsl_tests_config_noexcept INTERFACE + _HAS_EXCEPTIONS=0 # disable exceptions in the Microsoft STL + ) target_compile_options(gsl_tests_config_noexcept INTERFACE ${GSL_CPLUSPLUS_OPT} /W4