summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/default_post.prf
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-04-01 10:16:17 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-04-05 14:27:50 +0200
commitb5ed3cb7baeb6d77c375134719ee04ffcc211b9f (patch)
tree626bf96b93c2591b986b3719d63801c7251f4535 /mkspecs/features/default_post.prf
parent6c760f8cefd2a5c3037b8e4efd690bfd81400e10 (diff)
qmake: Add support for C++23
Add the CONFIG value c++2b that represent the upcoming C++23 standard. Add QMAKE_CXXFLAGS_CXX2B and QMAKE_CXXFLAGS_GNUCXX2B. On MSVC, use /std:c++latest when c++2b is active. This fixes an issue with MSVC where c++latest implied the /std:c++20 compiler flag. Pick-to: 5.15 6.2 6.3 Fixes: QTBUG-102202 Change-Id: Ie00ee5793c1a649195013c8c19efc8d59cf0acc9 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'mkspecs/features/default_post.prf')
-rw-r--r--mkspecs/features/default_post.prf9
1 files changed, 5 insertions, 4 deletions
diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf
index b94aab3e9c..2be446e41e 100644
--- a/mkspecs/features/default_post.prf
+++ b/mkspecs/features/default_post.prf
@@ -123,17 +123,18 @@ breakpad {
c++17: CONFIG += c++1z
c++20: CONFIG += c++2a
-c++latest: CONFIG *= c++2a c++1z c++14 c++11
+c++latest: CONFIG *= c++2b c++2a c++1z c++14 c++11
-!c++1z:!c++2a {
+!c++1z:!c++2a:!c++2b {
# Qt requires C++17
QT_COMPILER_STDCXX_no_L = $$replace(QT_COMPILER_STDCXX, "L$", "")
!greaterThan(QT_COMPILER_STDCXX_no_L, 201402): CONFIG += c++1z
}
-c++1z|c++2a {
+c++1z|c++2a|c++2b {
# Disable special compiler flags for host builds
!host_build|!cross_compile {
- c++2a: cxxstd = CXX2A
+ c++2b: cxxstd = CXX2B
+ else:c++2a: cxxstd = CXX2A
else: cxxstd = CXX1Z
} else {
# Fall back to c++17, because C++17 is required everywhere,