From eb6fe423398e7c2f996d7f4e7147519a848f2833 Mon Sep 17 00:00:00 2001 From: Andrew Paxie Date: Mon, 14 Jun 2021 04:58:06 +1200 Subject: [PATCH] Issue 237: Disable -Wreserved-identifer warning from clang++-13 --- CMakeLists.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e458c9c..acc67112 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,6 +150,9 @@ if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug) " -Wno-weak-vtables" " -Wno-exit-time-destructors" " -Wno-global-constructors") + + # Disable for Catch2. + # See check_cxx_compiler_flag("-Wno-extra-semi-stmt" WARN_SEMI_STMT) if (WARN_SEMI_STMT) @@ -166,6 +169,16 @@ if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug) " -Wno-zero-as-null-pointer-constant") endif() + # Disable for Catch2. + # See + check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID) + + if (WARN_RESERVED_ID) + string(APPEND + WARN_FLAGS + " -Wno-reserved-identifier") + endif() + elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU") string(CONCAT WARN_FLAGS