Merge pull request #14085 from cristian64/disable_wtrigraphs

CMakeLists: Disable `-Wtrigraphs`.
This commit is contained in:
JosJuice 2025-11-09 09:51:33 +01:00 committed by GitHub
commit db997e9963
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,6 +60,13 @@ else()
if (HAS_FORMAT_WARNING) if (HAS_FORMAT_WARNING)
check_and_add_flag(FORMAT_WARNING_TO_ERROR -Werror=format) check_and_add_flag(FORMAT_WARNING_TO_ERROR -Werror=format)
endif() endif()
# Trigraphs support is generally disabled by default, but some compilers (GCC) may still warn when
# one hypothetical trigraph is encountered. The warning is generally not interesting.
check_cxx_compiler_flag(-Wtrigraphs HAS_TRIGRAPHS_WARNING)
if (HAS_TRIGRAPHS_WARNING)
check_and_add_flag(NO_TRIGRAPHS_WARNING -Wno-trigraphs)
endif()
endif() endif()
# These aren't actually needed for C11/C++11 # These aren't actually needed for C11/C++11