diff options
author | l10n daemon script <scripty@kde.org> | 2015-11-08 21:01:33 +0000 |
---|---|---|
committer | l10n daemon script <scripty@kde.org> | 2015-11-08 21:01:33 +0000 |
commit | 7feccae76e01a65b406995b5ba9526fe9ade4299 (patch) | |
tree | 99011137f4dedcf4bf242e167ac7dc70d9136b8e /kde-modules/KDEFrameworkCompilerSettings.cmake | |
parent | a1bb0b0488843165e606771b75a3a67ba8a131a6 (diff) | |
parent | c88bc78e0ca3834c46b89ca9d14b404751da5d4a (diff) | |
download | extra-cmake-modules-5.16.0.tar.gz extra-cmake-modules-5.16.0.tar.bz2 |
Merge remote-tracking branch 'origin/master' into local_releasev5.16.0-rc2v5.16.0
Diffstat (limited to 'kde-modules/KDEFrameworkCompilerSettings.cmake')
-rw-r--r-- | kde-modules/KDEFrameworkCompilerSettings.cmake | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake index 3b77fc3c..e88c10d9 100644 --- a/kde-modules/KDEFrameworkCompilerSettings.cmake +++ b/kde-modules/KDEFrameworkCompilerSettings.cmake @@ -11,6 +11,8 @@ # For example, constructions like QString("foo") are prohibited, instead # forcing the use of QLatin1String or QStringLiteral, and some # Qt-defined keywords like signals and slots will not be defined. +# +# Since pre-1.0.0. #============================================================================= # Copyright 2013 Albert Astals Cid <aacid@kde.org> @@ -38,11 +40,16 @@ add_definitions(-DQT_NO_CAST_TO_ASCII -DQT_USE_FAST_OPERATOR_PLUS -DQT_USE_QSTRINGBUILDER ) -if(NOT MSVC) - # QT_STRICT_ITERATORS breaks MSVC: it tries to link to QTypedArrayData symbols - # when using foreach. However these symbols don't actually exist. - # Not having QT_STRICT_ITERATORS defined fixes this issue. - # This is fixed by https://codereview.qt-project.org/#change,76311 - # TODO: set QT_STRICT_ITERATORS on all platforms once we depend on Qt 5.3 - add_definitions(-DQT_STRICT_ITERATORS) + +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DQT_STRICT_ITERATORS) +endif() + +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() |