summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-08-26 09:51:07 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-27 14:25:09 +0000
commitfc43df00ca277f9e7a47f85d40b7d8e29597335c (patch)
tree00bf96e8d8d729c4a9b2c749b6da1d87a92ea080
parent5e23597a28abdefb093d4af2e60471b426f8a912 (diff)
qmake: Make it possible to set CONFIG += c11 with MSVC 19.28
The compiler that comes with Visual Studio 16.8 added support for setting the C11 standard with the /std:c11 flag. Add the respective version check in msvc-version.conf and set MSVC_VER and QMAKE_CFLAGS_C11 accordingly. Task-number: QTBUG-89296 Change-Id: I29b54ee073a765918f5aa4ebb081b97c5cf471d7 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 8914f80b278c030b2a6cc505e809b51920e178ce) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--mkspecs/common/msvc-version.conf6
1 files changed, 6 insertions, 0 deletions
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index 26ff635e65..d9f38dae67 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -117,4 +117,10 @@ greaterThan(QMAKE_MSC_VER, 1919) {
QMAKE_CXXFLAGS += -Zc:externConstexpr
}
+greaterThan(QMAKE_MSC_VER, 1927) {
+ # Visual Studio 2019 (16.8 or 16.9) / Visual C++ 19.28 and up
+ MSVC_VER = 16.8
+ QMAKE_CFLAGS_C11 = /std:c11
+}
+
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC