2015-09-02 10:54:21 +00:00
|
|
|
#
|
|
|
|
# qmake configuration for Microsoft Visual Studio C/C++ Compiler
|
2016-06-16 06:21:03 +00:00
|
|
|
# This file is used by win32-msvc, win32-clang-msvc, and all
|
2016-11-22 13:54:02 +00:00
|
|
|
# winrt-XXX-msvcXXX specs
|
2015-09-02 10:54:21 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Version-specific changes
|
|
|
|
#
|
|
|
|
|
2016-11-16 13:18:42 +00:00
|
|
|
isEmpty(QMAKE_MSC_VER): error("msvc-version.conf loaded but QMAKE_MSC_VER isn't set")
|
|
|
|
|
|
|
|
MSVC_VER = 8.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2005
|
2016-11-16 13:18:42 +00:00
|
|
|
|
|
|
|
greaterThan(QMAKE_MSC_VER, 1499) {
|
2015-09-02 10:54:21 +00:00
|
|
|
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
|
2016-11-16 13:18:42 +00:00
|
|
|
MSVC_VER = 9.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2008
|
2015-09-02 10:54:21 +00:00
|
|
|
QMAKE_CFLAGS_MP = -MP
|
|
|
|
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
|
|
|
|
}
|
|
|
|
|
2016-11-16 13:18:42 +00:00
|
|
|
greaterThan(QMAKE_MSC_VER, 1599) {
|
2015-09-02 10:54:21 +00:00
|
|
|
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
|
2016-11-16 13:18:42 +00:00
|
|
|
MSVC_VER = 10.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2010
|
2015-09-02 10:54:21 +00:00
|
|
|
MAKEFILE_GENERATOR = MSBUILD
|
|
|
|
|
|
|
|
QMAKE_CFLAGS_AVX = -arch:AVX
|
|
|
|
QMAKE_CFLAGS_AVX2 = -arch:AVX
|
|
|
|
|
|
|
|
VCPROJ_EXTENSION = .vcxproj
|
|
|
|
}
|
|
|
|
|
2016-11-16 13:18:42 +00:00
|
|
|
greaterThan(QMAKE_MSC_VER, 1699) {
|
2015-09-02 10:54:21 +00:00
|
|
|
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
|
2016-11-16 13:18:42 +00:00
|
|
|
MSVC_VER = 11.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2012
|
2015-09-02 10:54:21 +00:00
|
|
|
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
|
|
|
|
QT_CONFIG += c++11
|
|
|
|
CONFIG += c++11
|
|
|
|
}
|
|
|
|
|
2016-11-16 13:18:42 +00:00
|
|
|
greaterThan(QMAKE_MSC_VER, 1799) {
|
2015-09-02 10:54:21 +00:00
|
|
|
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
|
2016-11-16 13:18:42 +00:00
|
|
|
MSVC_VER = 12.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2013
|
2015-09-02 10:54:21 +00:00
|
|
|
QMAKE_CFLAGS += -FS
|
2017-03-14 05:56:27 +00:00
|
|
|
QMAKE_CXXFLAGS += -FS -Zc:rvalueCast -Zc:inline
|
2015-09-02 10:54:21 +00:00
|
|
|
|
2017-04-03 23:05:18 +00:00
|
|
|
QMAKE_CFLAGS_F16C = -arch:AVX
|
|
|
|
|
2016-11-16 13:18:42 +00:00
|
|
|
equals(QMAKE_MSC_VER, 1800) {
|
2015-09-02 10:54:21 +00:00
|
|
|
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
|
|
|
|
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
|
|
|
QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings
|
|
|
|
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-16 13:18:42 +00:00
|
|
|
greaterThan(QMAKE_MSC_VER, 1899) {
|
2015-09-02 10:54:21 +00:00
|
|
|
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
|
2016-11-16 13:18:42 +00:00
|
|
|
MSVC_VER = 14.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2015
|
2015-09-02 10:54:21 +00:00
|
|
|
QMAKE_CFLAGS += -Zc:strictStrings
|
|
|
|
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
|
|
|
|
QMAKE_CFLAGS_AVX2 = -arch:AVX2
|
|
|
|
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
|
2016-07-06 07:39:27 +00:00
|
|
|
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577 -wd4467
|
2017-01-30 08:13:59 +00:00
|
|
|
|
|
|
|
greaterThan(QMAKE_MSC_FULL_VER, 190023918):!intel_icl {
|
|
|
|
isEmpty(QT_CLANG_MAJOR_VERSION)|!lessThan(QT_CLANG_MAJOR_VERSION, 4) {
|
|
|
|
QMAKE_CFLAGS_UTF8_SOURCE = -utf-8
|
|
|
|
}
|
|
|
|
}
|
2015-09-02 10:54:21 +00:00
|
|
|
}
|
2016-11-16 13:18:42 +00:00
|
|
|
|
|
|
|
greaterThan(QMAKE_MSC_VER, 1909) {
|
|
|
|
# Visual Studio 2017 (15.0) / Visual C++ 19.10 and up
|
|
|
|
MSVC_VER = 15.0
|
2016-06-16 06:21:03 +00:00
|
|
|
COMPAT_MKSPEC = win32-msvc2017
|
2017-03-14 05:56:27 +00:00
|
|
|
QMAKE_CXXFLAGS += -Zc:referenceBinding
|
2016-11-16 13:18:42 +00:00
|
|
|
}
|
2016-06-16 06:21:03 +00:00
|
|
|
|
|
|
|
greaterThan(QMAKE_MSC_VER, 1910) {
|
|
|
|
# No compat spec past MSVC 2017
|
|
|
|
COMPAT_MKSPEC =
|
|
|
|
}
|
|
|
|
|
|
|
|
!isEmpty(COMPAT_MKSPEC):!$$COMPAT_MKSPEC: CONFIG += $$COMPAT_MKSPEC
|