summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-11-09 15:06:18 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-11-10 14:47:42 +0100
commit3582116a6036fc04d7895e33a853348b37598117 (patch)
tree90b8a61c82227c10967e8f4c5557b1bc88bf3299 /mkspecs
parent1c880752eb891e77c3d3b5ffbf60fbb9109120fb (diff)
qmake: Introduce the variable MSVC_TOOLSET_VER
...which represents the version of the MSVC platform toolset. This variable is used to set the platform toolset version in .vcxproj files. Before, the platform toolset version was determined in qmake's C++ code. Now, it's set next to where MSVC_VER is set in common mkspecs .conf files. This will simplify supporting new Visual Studio versions in the future. Change-Id: If78c921f93c6378829746d617c7e7d312174257e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/msvc-based-version.conf3
-rw-r--r--mkspecs/common/msvc-version.conf8
2 files changed, 11 insertions, 0 deletions
diff --git a/mkspecs/common/msvc-based-version.conf b/mkspecs/common/msvc-based-version.conf
index ba72c3a0ac..adc893836a 100644
--- a/mkspecs/common/msvc-based-version.conf
+++ b/mkspecs/common/msvc-based-version.conf
@@ -21,6 +21,7 @@ greaterThan(QMAKE_MSC_FULL_VER, 190023918):!intel_icl {
greaterThan(QMAKE_MSC_VER, 1909) {
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
MSVC_VER = 15.0
+ MSVC_TOOLSET_VER = 141
COMPAT_MKSPEC = win32-msvc2017
}
@@ -32,11 +33,13 @@ greaterThan(QMAKE_MSC_VER, 1910) {
greaterThan(QMAKE_MSC_VER, 1919) {
# Visual Studio 2019 (16.0) / Visual C++ 19.20 and up
MSVC_VER = 16.0
+ MSVC_TOOLSET_VER = 142
}
greaterThan(QMAKE_MSC_VER, 1929) {
# Visual Studio 2022 (17.0) / Visual C++ 19.30 and up
MSVC_VER = 17.0
+ MSVC_TOOLSET_VER = 143
}
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index fda50faabf..59fc0769a5 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -15,6 +15,7 @@ COMPAT_MKSPEC = win32-msvc2005
greaterThan(QMAKE_MSC_VER, 1499) {
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
MSVC_VER = 9.0
+ MSVC_TOOLSET_VER = 90
COMPAT_MKSPEC = win32-msvc2008
QMAKE_CFLAGS_MP = -MP
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
@@ -23,6 +24,7 @@ greaterThan(QMAKE_MSC_VER, 1499) {
greaterThan(QMAKE_MSC_VER, 1599) {
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
MSVC_VER = 10.0
+ MSVC_TOOLSET_VER = 100
COMPAT_MKSPEC = win32-msvc2010
MAKEFILE_GENERATOR = MSBUILD
@@ -35,6 +37,7 @@ greaterThan(QMAKE_MSC_VER, 1599) {
greaterThan(QMAKE_MSC_VER, 1699) {
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
MSVC_VER = 11.0
+ MSVC_TOOLSET_VER = 110
COMPAT_MKSPEC = win32-msvc2012
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = /wd4530 /wd4577
QT_CONFIG += c++11
@@ -44,6 +47,7 @@ greaterThan(QMAKE_MSC_VER, 1699) {
greaterThan(QMAKE_MSC_VER, 1799) {
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
MSVC_VER = 12.0
+ MSVC_TOOLSET_VER = 120
COMPAT_MKSPEC = win32-msvc2013
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS -Zc:rvalueCast -Zc:inline
@@ -63,6 +67,7 @@ greaterThan(QMAKE_MSC_VER, 1799) {
greaterThan(QMAKE_MSC_VER, 1899) {
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
MSVC_VER = 14.0
+ MSVC_TOOLSET_VER = 140
COMPAT_MKSPEC = win32-msvc2015
QMAKE_CFLAGS += -Zc:strictStrings
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
@@ -77,6 +82,7 @@ greaterThan(QMAKE_MSC_VER, 1899) {
greaterThan(QMAKE_MSC_VER, 1909) {
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
MSVC_VER = 15.0
+ MSVC_TOOLSET_VER = 141
COMPAT_MKSPEC = win32-msvc2017
QMAKE_CXXFLAGS += -permissive-
@@ -112,6 +118,7 @@ greaterThan(QMAKE_MSC_VER, 1910) {
greaterThan(QMAKE_MSC_VER, 1919) {
# Visual Studio 2019 (16.0) / Visual C++ 19.20 and up
MSVC_VER = 16.0
+ MSVC_TOOLSET_VER = 142
QMAKE_CXXFLAGS_CXX2A = -std:c++latest
QMAKE_CXXFLAGS += -Zc:externConstexpr
@@ -127,6 +134,7 @@ greaterThan(QMAKE_MSC_VER, 1927) {
greaterThan(QMAKE_MSC_VER, 1929) {
# Visual Studio 2022 (17.0) / Visual C++ 19.30 and up
MSVC_VER = 17.0
+ MSVC_TOOLSET_VER = 143
}
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC