qt5base-lts/mkspecs/common/msvc-base.conf

57 lines
1.7 KiB
Plaintext
Raw Normal View History

#
# 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
#
#
# Version-specific changes
#
greaterThan(MSC_VER, 1499) {
# Visual Studio 2008 (9.0) / Visual C++ 15.0 and up
QMAKE_CFLAGS_MP = -MP
QMAKE_CXXFLAGS_MP = $$QMAKE_CFLAGS_MP
}
greaterThan(MSC_VER, 1599) {
# Visual Studio 2010 (10.0) / Visual C++ 16.0 and up
MAKEFILE_GENERATOR = MSBUILD
QMAKE_CFLAGS_AVX = -arch:AVX
QMAKE_CFLAGS_AVX2 = -arch:AVX
VCPROJ_EXTENSION = .vcxproj
}
greaterThan(MSC_VER, 1699) {
# Visual Studio 2012 (11.0) / Visual C++ 17.0 and up
QMAKE_CXXFLAGS_EXCEPTIONS_OFF = -D_HAS_EXCEPTIONS=0
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE@QMAKE_SUBSYSTEM_SUFFIX@
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS@QMAKE_SUBSYSTEM_SUFFIX@
QT_CONFIG += c++11
CONFIG += c++11
}
greaterThan(MSC_VER, 1799) {
# Visual Studio 2013 (12.0) / Visual C++ 18.0 and up
QMAKE_CFLAGS += -FS
QMAKE_CXXFLAGS += -FS
equals(MSC_VER, 1800) {
QMAKE_CFLAGS_RELEASE += -Zc:strictStrings
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE += -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += -Zc:strictStrings
}
}
greaterThan(MSC_VER, 1899) {
# Visual Studio 2015 (14.0) / Visual C++ 19.0 and up
QMAKE_CFLAGS += -Zc:strictStrings
QMAKE_CFLAGS_WARN_ON += -w44456 -w44457 -w44458
QMAKE_CFLAGS_AVX2 = -arch:AVX2
QMAKE_CXXFLAGS += -Zc:strictStrings -Zc:throwingNew
QMAKE_CXXFLAGS_WARN_ON += -w44456 -w44457 -w44458 -wd4577
}