Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation with clang 13 #783

Merged
merged 1 commit into from
Jan 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "Clang")
-Wno-sign-conversion
-Wno-error=c11-extensions
)
# Some headers such as glib-2.0 use identifier names that start with '_' followed by a capital letter.
# The C standard reserves names beginning with an underscore and various other combinations.
# ISO/IEC 9899:1999 (aka C99 standard) 7.1.3 Reserved identifiers
check_c_compiler_flag(-Wreserved-identifier HAVE_RESERVED_IDENTIFIER_WARNING)
if(HAVE_RESERVED_IDENTIFIER_WARNING)
add_definitions(-Wno-reserved-identifier)
endif()
# The detection of cross compilation by -Wpoison-system-directories has false positives on macOS because
# --sysroot is implicitly added. Turn the warning off.
if(NOT DEFINED HAVE_POISON_SYSTEM_DIRECTORIES_WARNING)
Expand Down