diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-26 09:51:07 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2021-08-26 18:32:44 +0200 |
commit | 8914f80b278c030b2a6cc505e809b51920e178ce (patch) | |
tree | 54b3cb63c8e3eb1188629e2c1f2e1be3c2f774bd /mkspecs/common/msvc-version.conf | |
parent | b073de274dfe0419b1e8a4f5262b11078fde88e0 (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.
Pick-to: 6.2 5.15
Task-number: QTBUG-89296
Change-Id: I29b54ee073a765918f5aa4ebb081b97c5cf471d7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs/common/msvc-version.conf')
-rw-r--r-- | mkspecs/common/msvc-version.conf | 6 |
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 |