From f3620bb0091cfcfd5162871e15e8a2f8348165f0 Mon Sep 17 00:00:00 2001 From: dmitrykobets-msft <89153909+dmitrykobets-msft@users.noreply.github.com> Date: Wed, 14 Dec 2022 15:39:34 -0800 Subject: [PATCH] Suppress false postive warning (#1068) The Clang compiler for MSVC in Visual Studio 2022 17.4.33122.133 used by the test runner has a bug which raises -Wdeprecated "out-of-line definition of constexpr static data member is redundant in C++17 and is deprecated" in gsl/span, when compiling with C++14. Temporarily suppress this warning for MSVC Clang with C++14. --- tests/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 608d52b..59a8250 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -110,6 +110,9 @@ if(MSVC) # MSVC or simulating MSVC $<$: # no support for [[maybe_unused]] -Wno-unused-member-function -Wno-unused-variable + $<$,15.0.1>: + -Wno-deprecated # False positive in MSVC Clang 15.0.1 raises a C++17 warning + > > > ) @@ -240,6 +243,11 @@ if(MSVC) # MSVC or simulating MSVC -Wno-c++98-compat-pedantic -Wno-missing-prototypes -Wno-unknown-attributes + $<$: + $<$,15.0.1>: + -Wno-deprecated # False positive in MSVC Clang 15.0.1 raises a C++17 warning + > + > > ) check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID)