aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDEFrameworkCompilerSettings.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'kde-modules/KDEFrameworkCompilerSettings.cmake')
-rw-r--r--kde-modules/KDEFrameworkCompilerSettings.cmake10
1 files changed, 4 insertions, 6 deletions
diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake
index a96d3fb5..7d30ec66 100644
--- a/kde-modules/KDEFrameworkCompilerSettings.cmake
+++ b/kde-modules/KDEFrameworkCompilerSettings.cmake
@@ -61,14 +61,12 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_definitions(-DQT_STRICT_ITERATORS)
endif()
-if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
+endif()
+
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" )
endif()
-elseif (CMAKE_CXX_COMPILER_ID MATCHES "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()