diff options
author | Alex Richardson <arichardson.kde@gmail.com> | 2015-09-10 14:44:33 +0100 |
---|---|---|
committer | Alex Richardson <arichardson.kde@gmail.com> | 2015-09-10 14:44:33 +0100 |
commit | 456d7772dcc2ae2f6f36bb6358d04cbdd1218d30 (patch) | |
tree | f9dc305b26478563d06858ee7f9adb430adedd42 | |
parent | 8ef3f474e3a6def47dce36b54fbdce2d98c79342 (diff) | |
download | extra-cmake-modules-456d7772dcc2ae2f6f36bb6358d04cbdd1218d30.tar.gz extra-cmake-modules-456d7772dcc2ae2f6f36bb6358d04cbdd1218d30.tar.bz2 |
Disable -Wgnu-zero-variadic-macro-arguments when using clang
This warning is emitted for every qCDebug() call and is not useful.
REVIEW: 125031
-rw-r--r-- | kde-modules/KDEFrameworkCompilerSettings.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake index 84de77ab..e88c10d9 100644 --- a/kde-modules/KDEFrameworkCompilerSettings.cmake +++ b/kde-modules/KDEFrameworkCompilerSettings.cmake @@ -45,6 +45,11 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug") add_definitions(-DQT_STRICT_ITERATORS) endif() -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + # -Wgnu-zero-variadic-macro-arguments is triggered by every qCDebug() call and therefore results + # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour + # instead of the exact standard wording so we can safely ignore it + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-gnu-zero-variadic-macro-arguments") endif() |