summaryrefslogtreecommitdiffstats
path: root/mkspecs/common/msvc-version.conf
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-06-15 23:21:03 -0700
committerOswald Buddenhagen <oswald.buddenhagen@qt.io>2016-12-23 13:45:39 +0000
commit04403d5b12debadf95b565bf84e0527ae787c87d (patch)
tree9a9599075577cbbf27ed61247f7676c5e00e600b /mkspecs/common/msvc-version.conf
parent4d9fbb33458c82aaf37d9712495a0653aae70533 (diff)
Merge all "win32-msvc*" mkspecs into one
Since we can tell the MSVC version from the compiler now, each of the qmake.conf files is now the same, so let's just have "win32-msvc" and be future-proof. Likewise for win32-clang-msvc. qplatformdefs.h was already common. Since we can't obtain the MSVC version from the unified mkspec name any more, I dropped the warning level during the qmake bootstrap to reduce the number of warnings that need to be disabled from compiler version to version. There is no point in keeping the old mkspecs, but configure will re-map the -platform argument to the unified spec as necessary, to keep existing configure command lines working. [ChangeLog][Visual Studio] Qt now has a common mkspec for all Visual Studio versions, called "win32-msvc". The old names which contained the version number are now gone (but qmake scopes based on the old names continue to work). The version of the compiler can be obtained from the MSC_VER and MSVC_VER variables (for example, for Visual Studio 2015, those contain the values 1900 and 14.0, respectively). Those variables are also available with the Intel compiler (win32-icc) and with Clang (win32-clang-msvc). Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Change-Id: Ib57b52598e2f452985e9fffd14587c0a77a5c09c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'mkspecs/common/msvc-version.conf')
-rw-r--r--mkspecs/common/msvc-version.conf18
1 files changed, 16 insertions, 2 deletions
diff --git a/mkspecs/common/msvc-version.conf b/mkspecs/common/msvc-version.conf
index 8158ee37ab..147009cd9f 100644
--- a/mkspecs/common/msvc-version.conf
+++ b/mkspecs/common/msvc-version.conf
@@ -1,7 +1,7 @@
#
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
-# This mkspec is used for all win32-msvcXXXX, winrt-XXX-msvcXXX
-# and winphone-XXX-msvcXXX specs
+# This file is used by win32-msvc, win32-clang-msvc, and all
+# winphone-XXX-msvcXXXX specs
#
#
@@ -11,10 +11,12 @@
isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set")
MSVC_VER = 8.0
+COMPAT_MKSPEC = win32-msvc2005
greaterThan(QMAKE_MSC_VER, 1499) {
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
MSVC_VER = 9.0
+ COMPAT_MKSPEC = win32-msvc2008
QMAKE_CFLAGS_MP = -MP
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
}
@@ -22,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
+ COMPAT_MKSPEC = win32-msvc2010
MAKEFILE_GENERATOR = MSBUILD
QMAKE_CFLAGS_AVX = -arch:AVX
@@ -33,6 +36,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
+ COMPAT_MKSPEC = win32-msvc2012
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
QT_CONFIG += c++11
CONFIG += c++11
@@ -41,6 +45,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
+ COMPAT_MKSPEC = win32-msvc2013
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
@@ -55,6 +60,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
+ COMPAT_MKSPEC = win32-msvc2015
QMAKE_CFLAGS += -Zc:strictStrings
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
QMAKE_CFLAGS_AVX2 = -arch:AVX2
@@ -65,4 +71,12 @@ 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
+ COMPAT_MKSPEC = win32-msvc2017
}
+
+greaterThan(QMAKE_MSC_VER, 1910) {
+ # No compat spec past MSVC 2017
+ COMPAT_MKSPEC =
+}
+
+!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC