diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2d37a51..8781fad 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -34,7 +34,7 @@ endif() # please try to keep entries ordered =) add_library(gsl_tests_config INTERFACE) target_compile_options(gsl_tests_config INTERFACE - $<$: + $<$,$,$>>: /EHsc /W4 /WX @@ -57,6 +57,11 @@ target_compile_options(gsl_tests_config INTERFACE -Wshadow -Wsign-conversion > + $<$: + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-undef + > ) # for tests to find the catch header @@ -122,7 +127,7 @@ endforeach(flag_var) # please try to keep entries ordered =) add_library(gsl_tests_config_noexcept INTERFACE) target_compile_options(gsl_tests_config_noexcept INTERFACE - $<$: + $<$,$,$>>: /D_HAS_EXCEPTIONS=0 /wd4702 /wd4577 @@ -131,8 +136,10 @@ target_compile_options(gsl_tests_config_noexcept INTERFACE > ${GSL_CPLUSPLUS_OPT} $<$>: + $<$,$>>: + -fno-exceptions + > -fno-strict-aliasing - -fno-exceptions -Wall -Wcast-align -Wconversion @@ -148,6 +155,11 @@ target_compile_options(gsl_tests_config_noexcept INTERFACE -Wshadow -Wsign-conversion > + $<$: + -Wno-c++98-compat + -Wno-c++98-compat-pedantic + -Wno-undef + > ) # set definitions for tests