From 12af1e4e5a7352c3bbd4660aedc0010f108eb377 Mon Sep 17 00:00:00 2001 From: "Friedrich W. H. Kossebau" Date: Tue, 23 Feb 2021 12:04:19 +0100 Subject: KDECompilerSettings: add KDE_COMPILERSETTINGS_LEVEL & more settings There is desire for having more strict compiler settings by default over what the KDECompilerSettings have been declaring until now. This means making more use of modern features usually and being less tolerant about the use of deprecated ones. While some projects have used KDEFrameworksCompilerSettings to get more modern requirements by just a single macro include, that was not the intent of that module, and now is also warned about in the docs. Instead of adding a new separate dedicated module e.g. named KDEStricterCompilerSettings, with a separate version scheme for sets of strict settings, the existing KDECompilerSettings macro file is instead extended as well as are the ECM versions reused to define the different sets of settings. As these settings are getting more strict by the time, e.g. allowing less of old & deprecated code, these sets are considered as kind of levels. To enable the clients to control the required settings level, a dedicated variable KDE_COMPILERSETTINGS_LEVEL is introduced, which for convenience defaults to the minimum required ECM version, so only needs to be set when the need for other newer features provided by ECM does not go along the settings level of that ECM version. As some projects might have needs not exactly matching a certain settings level, additionally the settings can be optionally individually controlled by specific variables, to be set again before including KDECompilerSettings. --- kde-modules/KDEFrameworkCompilerSettings.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'kde-modules/KDEFrameworkCompilerSettings.cmake') diff --git a/kde-modules/KDEFrameworkCompilerSettings.cmake b/kde-modules/KDEFrameworkCompilerSettings.cmake index 264e715c..d7165f57 100644 --- a/kde-modules/KDEFrameworkCompilerSettings.cmake +++ b/kde-modules/KDEFrameworkCompilerSettings.cmake @@ -37,6 +37,7 @@ if (NOT CMAKE_CXX_STANDARD) endif() endif() +set(KDE_COMPILERSETTINGS_LEVEL 5.84.0) include(KDECompilerSettings NO_POLICY_SCOPE) add_definitions(-DQT_NO_CAST_TO_ASCII -- cgit v1.2.1