summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <[email protected]>2025-06-24 10:08:15 +0200
committerQt Cherry-pick Bot <[email protected]>2025-06-25 08:38:11 +0000
commit7abb9b798b78dcc3ff54fc754f424c490081a4d5 (patch)
tree4adef38d5976fcc88a561d22a0f3fa72343f59e5
parentf4e1fb49796ceac06e4ca58048950d4eb037f435 (diff)
Build system: support C++23 for C++2b6.9
Adjust user-visible labels and comments from "C++2b" to "C++23" and alias the machine-readable cmake and qmake features c++/cxx2b to c++/cxx23. Pick-to: 6.8 6.5 Change-Id: Iea721ea2cb72b9e1d284d84569169fffe21afc10 Reviewed-by: Alexandru Croitor <[email protected]> (cherry picked from commit 54797309dda3a3861d279120ee05c9df458188c1) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit a44ad3f9a11cc8109363adf1aeac3a681a0baa58)
-rw-r--r--configure.cmake6
-rw-r--r--mkspecs/features/default_post.prf1
-rw-r--r--qt_cmdline.cmake2
3 files changed, 5 insertions, 4 deletions
diff --git a/configure.cmake b/configure.cmake
index 6881a02d542..2036c55e581 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -270,10 +270,10 @@ int main(void)
)
qt_config_compile_test(cxx2b
- LABEL "C++2b support"
+ LABEL "C++23 support"
CODE
"#if __cplusplus > 202002L
-// Compiler claims to support C++2B, trust it
+// Compiler claims to support C++23, trust it
#else
# error __cplusplus must be > 202002L (the value for C++20)
#endif
@@ -727,7 +727,7 @@ qt_feature("c++2a" PUBLIC
)
qt_feature_config("c++2a" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("c++2b" PUBLIC
- LABEL "C++2b"
+ LABEL "C++23"
AUTODETECT OFF
CONDITION QT_FEATURE_cxx20 AND (CMAKE_VERSION VERSION_GREATER_EQUAL "3.20") AND TEST_cxx2b
)
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index 2be446e41ec..a44d03c91bb 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -123,6 +123,7 @@ breakpad {
c++17: CONFIG += c++1z
c++20: CONFIG += c++2a
+c++23: CONFIG += c++2b
c++latest: CONFIG *= c++2b c++2a c++1z c++14 c++11
!c++1z:!c++2a:!c++2b {
diff --git a/qt_cmdline.cmake b/qt_cmdline.cmake
index 191151535c5..b80c8fd7751 100644
--- a/qt_cmdline.cmake
+++ b/qt_cmdline.cmake
@@ -152,7 +152,7 @@ function(qt_commandline_cxxstd arg val nextok)
elseif(val MATCHES "(c\\+\\+)?(20|2a)")
qtConfCommandlineEnableFeature(c++20)
qtConfCommandlineDisableFeature(c++2b)
- elseif(val MATCHES "(c\\+\\+)?(2b)")
+ elseif(val MATCHES "(c\\+\\+)?(23|2b)")
qtConfCommandlineEnableFeature(c++20)
qtConfCommandlineEnableFeature(c++2b)
else()