clang's variadic macro warnings: only for clang

following settings of cmake/modules/Warnings.cmake

Signed-off-by: yopito <pierre.bourgin@free.fr>
This commit is contained in:
yopito 2021-04-24 00:11:24 +02:00 committed by Felix Weilbach (Rebase PR Action)
parent 384aeb513b
commit 14d61c5071

View file

@ -30,10 +30,12 @@ if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=2")
endif()
# Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
if (CMAKE_CXX_COMPILER MATCHES "Clang")
# Calling Qt's qCWarning(category, ...) with no params for "..." is a GNU
# extension (C++11 §16.3/4 forbids them). Silence clang's warnings.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu-zero-variadic-macro-arguments")
endif()
endif()
if(WIN32)