diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 82e84cb0..8accea98 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -124,7 +124,7 @@ if(MSVC) # MSVC or simulating MSVC > > ) - check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID) + check_cxx_compiler_flag("-Wreserved-identifier" WARN_RESERVED_ID) if (WARN_RESERVED_ID) target_compile_options(gsl_tests_config INTERFACE "-Wno-reserved-identifier") endif() @@ -193,7 +193,7 @@ else() > ) endif(MSVC) -check_cxx_compiler_flag("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) +check_cxx_compiler_flag("-Wunsafe-buffer-usage" WARN_UNSAFE_BUFFER) if (WARN_UNSAFE_BUFFER) # This test uses very greedy heuristics such as "no pointer arithmetic on raw buffer" target_compile_options(gsl_tests_config INTERFACE "-Wno-unsafe-buffer-usage") @@ -260,7 +260,7 @@ if(MSVC) # MSVC or simulating MSVC > > ) - check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID) + check_cxx_compiler_flag("-Wreserved-identifier" WARN_RESERVED_ID) if (WARN_RESERVED_ID) target_compile_options(gsl_tests_config_noexcept INTERFACE "-Wno-reserved-identifier") endif() @@ -305,7 +305,7 @@ else() > ) endif(MSVC) -check_cxx_compiler_flag("-Wno-unsafe-buffer-usage" WARN_UNSAFE_BUFFER) +check_cxx_compiler_flag("-Wunsafe-buffer-usage" WARN_UNSAFE_BUFFER) if (WARN_UNSAFE_BUFFER) # This test uses very greedy heuristics such as "no pointer arithmetic on raw buffer" target_compile_options(gsl_tests_config_noexcept INTERFACE "-Wno-unsafe-buffer-usage")