mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[common] detect clang and disable warnings for unknown-warning-option
Clang doesn't know the warning option `format-truncation`, which GCC falsely triggers on when calling vsnprintf. Further to this, GCC doesn't understand the warning group `unknown-warning-option`, as such we must disable these warnings in the cmake.
This commit is contained in:
parent
e79661a924
commit
6358f35cb7
@ -11,6 +11,12 @@ if(ENABLE_BACKTRACE)
|
||||
add_definitions(-DENABLE_BACKTRACE)
|
||||
endif()
|
||||
|
||||
if (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||
add_compile_options(
|
||||
"-Wno-unknown-warning-option"
|
||||
)
|
||||
endif()
|
||||
|
||||
add_subdirectory(src/platform)
|
||||
|
||||
set(COMMON_SOURCES
|
||||
|
Loading…
Reference in New Issue
Block a user