aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAhmad Samir <a.samirh78@gmail.com>2021-06-19 13:09:03 +0200
committerAhmad Samir <a.samirh78@gmail.com>2021-06-19 11:46:25 +0000
commite9ac97b9a1adb49ee86320694ff467f391af968e (patch)
treeafacb5591ae1884dc406bd518907f20b1df85d56
parentc3bada8f9ff5ed65ac59222de71ef9a288366b10 (diff)
downloadextra-cmake-modules-e9ac97b9a1adb49ee86320694ff467f391af968e.tar.gz
extra-cmake-modules-e9ac97b9a1adb49ee86320694ff467f391af968e.tar.bz2
Bump the C++ standard we compile with to 17
But only for repos that require Frameworks 5.83 or newer. We have asked on the KDE distributions mailing list and distro maintainers didn't object to the change (since most distros already have recent enough compilers).
-rw-r--r--kde-modules/KDEFrameworkCompilerSettings.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake
index 7459594e..4e79da9b 100644
--- a/kde-modules/KDEFrameworkCompilerSettings.cmake
+++ b/kde-modules/KDEFrameworkCompilerSettings.cmake
@@ -25,6 +25,13 @@ flag, otherwise you may get spurious warnings with some versions of CMake.
Since pre-1.0.0.
#]=======================================================================]
+if (NOT CMAKE_CXX_STANDARD)
+ if (ECM_GLOBAL_FIND_VERSION VERSION_GREATER_EQUAL 5.83.0)
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED True)
+ endif()
+endif()
+
include(KDECompilerSettings NO_POLICY_SCOPE)
add_definitions(-DQT_NO_CAST_TO_ASCII