Skip to content

Commit 2e56c24

Browse files
authored
Merge pull request #239 from AndrewPaxie/issue-237
Issue 237: Disable -Wreserved-identifer warning from clang++-13
2 parents a87c1d4 + eb6fe42 commit 2e56c24

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug)
150150
" -Wno-weak-vtables"
151151
" -Wno-exit-time-destructors"
152152
" -Wno-global-constructors")
153+
154+
# Disable for Catch2.
155+
# See <https://github.com/catchorg/Catch2/issues/1456>
153156
check_cxx_compiler_flag("-Wno-extra-semi-stmt" WARN_SEMI_STMT)
154157

155158
if (WARN_SEMI_STMT)
@@ -166,6 +169,16 @@ if (MASTER_PROJECT AND CMAKE_BUILD_TYPE MATCHES Debug)
166169
" -Wno-zero-as-null-pointer-constant")
167170
endif()
168171

172+
# Disable for Catch2.
173+
# See <https://github.com/catchorg/Catch2/issues/578>
174+
check_cxx_compiler_flag("-Wno-reserved-identifier" WARN_RESERVED_ID)
175+
176+
if (WARN_RESERVED_ID)
177+
string(APPEND
178+
WARN_FLAGS
179+
" -Wno-reserved-identifier")
180+
endif()
181+
169182
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
170183
string(CONCAT
171184
WARN_FLAGS

0 commit comments

Comments
 (0)