[utilities/konsole] /: Switch whole project to C++20

Friedrich W. H. Kossebau <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit f4ad7bfcace436993e05c84f1325c9a19b8916e5 by Friedrich W. H. Kossebau.
Committed on 05/08/2026 at 17:14.
Pushed by kossebau into branch 'master'.

Switch whole project to C++20

konsolecontainers with cxx_std_20 as public feature already has had half of the project set to it.

Setting before including KDECompilerSettings, as documented

M  +4    -4    CMakeLists.txt
M  +0    -2    src/containers/CMakeLists.txt

https://invent.kde.org/utilities/konsole/-/commit/f4ad7bfcace436993e05c84f1325c9a19b8916e5

diff --git a/CMakeLists.txt b/CMakeLists.txt
index f0dcbbc55..3f16500ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,6 +19,10 @@ set(KF6_DEP_VERSION "6.0.0")
 # Release script will create bugzilla versions
 project(konsole VERSION ${RELEASE_SERVICE_VERSION})
 
+set(CMAKE_CXX_STANDARD 20)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
+
 find_package(ECM ${KF6_DEP_VERSION} REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
 
@@ -129,10 +133,6 @@ check_symbol_exists(getpwuid "pwd.h" HAVE_GETPWUID)
 
 check_function_exists(malloc_trim HAVE_MALLOC_TRIM)
 
-set(CMAKE_CXX_STANDARD 17)
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-set(CMAKE_CXX_EXTENSIONS OFF)
-
 include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
 
 file(GLOB ICONS_SRCS "data/icons/*.png")
diff --git a/src/containers/CMakeLists.txt b/src/containers/CMakeLists.txt
index 24cf680e7..22d98d57e 100644
--- a/src/containers/CMakeLists.txt
+++ b/src/containers/CMakeLists.txt
@@ -19,8 +19,6 @@ add_library(konsolecontainers STATIC ${konsolecontainers_SRCS})
 
 set_target_properties(konsolecontainers PROPERTIES POSITION_INDEPENDENT_CODE ON)
 
-target_compile_features(konsolecontainers PUBLIC cxx_std_20)
-
 target_link_libraries(konsolecontainers
     PUBLIC
     Qt::Core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.