mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-03 17:56:43 -05:00
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.
This commit is contained in:
parent
517ed29228
commit
f3620bb009
@ -110,6 +110,9 @@ if(MSVC) # MSVC or simulating MSVC
|
|||||||
$<$<EQUAL:${GSL_CXX_STANDARD},14>: # no support for [[maybe_unused]]
|
$<$<EQUAL:${GSL_CXX_STANDARD},14>: # no support for [[maybe_unused]]
|
||||||
-Wno-unused-member-function
|
-Wno-unused-member-function
|
||||||
-Wno-unused-variable
|
-Wno-unused-variable
|
||||||
|
$<$<VERSION_EQUAL:$<CXX_COMPILER_VERSION>,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-c++98-compat-pedantic
|
||||||
-Wno-missing-prototypes
|
-Wno-missing-prototypes
|
||||||
-Wno-unknown-attributes
|
-Wno-unknown-attributes
|
||||||
|
$<$<EQUAL:${GSL_CXX_STANDARD},14>:
|
||||||
|
$<$<VERSION_EQUAL:$<CXX_COMPILER_VERSION>,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)
|
check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID)
|
||||||
|
Loading…
Reference in New Issue
Block a user