MSVC: Enable standard-conformance mode by default

That's not the same as -Za.

Change-Id: Ica9894dc9b5e48278fd4fffd14bb316b687abffe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Thiago Macieira 2017-05-03 13:07:18 -07:00
parent e4eaa62943
commit b7d76e533c
2 changed files with 7 additions and 2 deletions

View File

@ -81,6 +81,7 @@ greaterThan(QMAKE_MSC_VER, 1909) {
MSVC_VER = 15.0
COMPAT_MKSPEC = win32-msvc2017
QMAKE_CXXFLAGS += -Zc:referenceBinding
QMAKE_CXXFLAGS_STRICTCXX = -permissive-
}
greaterThan(QMAKE_MSC_VER, 1910) {

View File

@ -124,8 +124,12 @@ c++11|c++14|c++1z {
cxxstd = CXX11
}
# Check if we should disable the GNU extensions or not
!strict_c++:!isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd): cxxstd = GNU$$cxxstd
# Check if we should disable compiler extensions or not
isEmpty(QMAKE_CXXFLAGS_GNU$$cxxstd) {
strict_c++: QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STRICTCXX
} else {
!strict_c++: cxxstd = GNU$$cxxstd
}
QMAKE_CXXFLAGS += $$eval(QMAKE_CXXFLAGS_$$cxxstd)
QMAKE_LFLAGS += $$eval(QMAKE_LFLAGS_$$cxxstd)