Skip to content

Commit

Permalink
Merge pull request #239 from AndrewPaxie/issue-237
Browse files Browse the repository at this point in the history
Issue 237: Disable -Wreserved-identifer warning from clang++-13
  • Loading branch information
rollbear authored Jun 13, 2021
2 parents a87c1d4 + eb6fe42 commit 2e56c24
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/catchorg/Catch2/issues/1456>
check_cxx_compiler_flag("-Wno-extra-semi-stmt" WARN_SEMI_STMT)

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

# Disable for Catch2.
# See <https://github.com/catchorg/Catch2/issues/578>
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
Expand Down

0 comments on commit 2e56c24

Please sign in to comment.