aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/KDECompilerSettings.cmake
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2019-01-19 12:00:44 +0100
committerAlbert Astals Cid <aacid@kde.org>2019-01-19 12:01:07 +0100
commit7d73c6744f6455c585a6e059cf2753fcf20a870a (patch)
tree72e6b10fa21be891894993666f8f63073c669897 /kde-modules/KDECompilerSettings.cmake
parenta2a404f9f9247a2b442073a744386dae69665b6a (diff)
downloadextra-cmake-modules-7d73c6744f6455c585a6e059cf2753fcf20a870a.tar.gz
extra-cmake-modules-7d73c6744f6455c585a6e059cf2753fcf20a870a.tar.bz2
Move -Wsuggest-override -Wlogical-op to regular compiler settings
Summary: They really help making the code better so it's good to have all applications getting those warnings Subscribers: apol, vkrause, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18167
Diffstat (limited to 'kde-modules/KDECompilerSettings.cmake')
-rw-r--r--kde-modules/KDECompilerSettings.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/kde-modules/KDECompilerSettings.cmake b/kde-modules/KDECompilerSettings.cmake
index c713cc2f..b60e4ea1 100644
--- a/kde-modules/KDECompilerSettings.cmake
+++ b/kde-modules/KDECompilerSettings.cmake
@@ -384,6 +384,12 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_CXX_COMPILER_VERSION VER
endif()
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 -Wlogical-op" )
+ endif()
+endif()
+
# -w1 turns on warnings and errors
# FIXME: someone needs to have a closer look at the Intel compiler options
if (CMAKE_C_COMPILER_ID STREQUAL "Intel" AND NOT WIN32)