Changeset View
Changeset View
Standalone View
Standalone View
kde-modules/KDEFrameworkCompilerSettings.cmake
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 60 | if (CMAKE_BUILD_TYPE STREQUAL "Debug") | |||
---|---|---|---|---|---|
61 | add_definitions(-DQT_STRICT_ITERATORS) | 61 | add_definitions(-DQT_STRICT_ITERATORS) | ||
62 | endif() | 62 | endif() | ||
63 | 63 | | |||
64 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 64 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
65 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") | 65 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") | ||
66 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | 66 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | ||
67 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" ) | 67 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" ) | ||
68 | endif() | 68 | endif() | ||
69 | elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | 69 | elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
70 | # -Wgnu-zero-variadic-macro-arguments is triggered by every qCDebug() call and therefore results | 70 | # -Wgnu-zero-variadic-macro-arguments is triggered by every qCDebug() call and therefore results | ||
71 | # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour | 71 | # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour | ||
72 | # instead of the exact standard wording so we can safely ignore it | 72 | # instead of the exact standard wording so we can safely ignore it | ||
73 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-gnu-zero-variadic-macro-arguments") | 73 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wno-gnu-zero-variadic-macro-arguments") | ||
74 | endif() | 74 | endif() |