diff options
author | Christian Heimlich <chris@pcserenity.com> | 2022-02-09 16:41:36 -0500 |
---|---|---|
committer | Christian Heimlich <chris@pcserenity.com> | 2022-02-11 22:05:20 +0000 |
commit | cc70c397cefe12436e2228fd70bb1f043ca260a7 (patch) | |
tree | f2acc7461cbb4e50182573ea0ebb5e36e22dfffa /mkspecs | |
parent | c0af004d7472065ccf64e2b05349febac1b4f9de (diff) | |
download | qtbase-cc70c397cefe12436e2228fd70bb1f043ca260a7.tar.gz |
Update MSVC qmake mkspecs to make -std:c++20 available for VS2019 16.11+
Set QMAKE_CXXFLAGS_CXX2A variable to -std:c++20 while building projects
with qmake and MSVC 16.11 or greater (_MSC_FULL_VER >= 192930133), when
c++2a is specified in the project config.
Pick-to: 6.2 6.3
Change-Id: If9a48d1ed16cb05c5cc01414ce8a4344e22438fe
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/common/msvc-version.conf | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf index 59fc0769a5..13dd349cf4 100644 --- a/mkspecs/common/msvc-version.conf +++ b/mkspecs/common/msvc-version.conf @@ -131,6 +131,14 @@ greaterThan(QMAKE_MSC_VER, 1927) { QMAKE_CFLAGS_C17 = /std:c17 } +greaterThan(QMAKE_MSC_VER, 1928) { + # Visual Studio 2019 (16.10 or 16.11) / Visual C++ 19.29 and up + MSVC_VER = 16.10 + + # -std:c++20 compiler option for Visual Studio 2019 16.11.0 and up + greaterThan(QMAKE_MSC_FULL_VER, 192930132): QMAKE_CXXFLAGS_CXX2A = -std:c++20 +} + greaterThan(QMAKE_MSC_VER, 1929) { # Visual Studio 2022 (17.0) / Visual C++ 19.30 and up MSVC_VER = 17.0 |