aboutsummaryrefslogtreecommitdiff
path: root/kde-modules
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2019-04-07 15:18:52 +0200
committerDavid Faure <faure@kde.org>2019-04-07 19:00:28 +0200
commit9b0df10c7d1ee449237a6187049408743308a302 (patch)
tree52cf54d3cf9d7d01c077e9880e5158e9dd76ee24 /kde-modules
parentada1664ba2e04a3ecb7cf32faacebd6006473526 (diff)
downloadextra-cmake-modules-9b0df10c7d1ee449237a6187049408743308a302.tar.gz
extra-cmake-modules-9b0df10c7d1ee449237a6187049408743308a302.tar.bz2
Unconditionally enable -DQT_STRICT_ITERATORS, not just in debug mode
Summary: It turns out QT_STRICT_ITERATORS does not introduce any overhead (they are inlined so everything gets optimized), confirmed by Dan comparing the produced assembly in Compiler Explorer. Reviewers: dvratil, mlaurent, aacid Reviewed By: aacid Subscribers: aacid, kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D20349
Diffstat (limited to 'kde-modules')
-rw-r--r--kde-modules/KDEFrameworkCompilerSettings.cmake5
1 files changed, 1 insertions, 4 deletions
diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake
index 7b62c3e0..d2db5e56 100644
--- a/kde-modules/KDEFrameworkCompilerSettings.cmake
+++ b/kde-modules/KDEFrameworkCompilerSettings.cmake
@@ -55,12 +55,9 @@ add_definitions(-DQT_NO_CAST_TO_ASCII
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
-DQT_USE_QSTRINGBUILDER
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
+ -DQT_STRICT_ITERATORS
)
-if (CMAKE_BUILD_TYPE STREQUAL "Debug")
- add_definitions(-DQT_STRICT_ITERATORS)
-endif()
-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
endif()