Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion cmake/maintainer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ IF(MY_COMPILER_IS_CLANG)
MY_ADD_C_WARNING_FLAG("Wunreachable-code-break")
MY_ADD_C_WARNING_FLAG("Wunreachable-code-return")
ENDIF()

# Extra warning flags for Clang++
IF(MY_COMPILER_IS_CLANG)
# Disable a few default Clang++ warnings
Expand All @@ -104,6 +104,17 @@ IF(MY_COMPILER_IS_CLANG)

STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wconditional-uninitialized")
STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wdeprecated")

# Xcode >= 14 makes noise about sprintf, and loss of precision when
# assigning integers from 64 bits to 32 bits, so silence. We can't
# put these two deprecation exceptions in Darwin.cmake because the
# previous line adding -Wdeprecated would be added later and
# override them, so do it here instead:
IF(APPLE)
STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wno-deprecated-declarations")
STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wno-shorten-64-to-32")
ENDIF()

STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wextra-semi")
STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wheader-hygiene")
STRING_APPEND(MY_CXX_WARNING_FLAGS " -Wnon-virtual-dtor")
Expand Down