refs #800 Extend elevated warnings mode and make it configurable with BLACK_CONFIG.

This commit is contained in:
Mathew Sutcliffe
2016-11-09 23:47:22 +00:00
committed by Klaus Basan
parent ee8518ef93
commit f60f46bcda
2 changed files with 19 additions and 7 deletions

View File

@@ -15,6 +15,7 @@ BLACK_CONFIG *= FSX
BLACK_CONFIG *= XPlane
BLACK_CONFIG *= ProfileRelease
BLACK_CONFIG *= AssertsInRelease
#BLACK_CONFIG *= AllowNoisyWarnings
BLACK_CONFIG *= PackageInstaller
#BLACK_CONFIG *= Static
BLACK_CONFIG *= Doxygen

View File

@@ -1,14 +1,25 @@
win32-msvc*:DEFINES *= _SCL_SECURE_NO_WARNINGS
# win32-msvc*:QMAKE_CXXFLAGS *=
# exclude Qt lib warnings
# win32-g++: QMAKE_CXXFLAGS += $$join(QMAKE_INCDIR_QT, " -isystem", "-isystem")
msvc:DEFINES *= _SCL_SECURE_NO_WARNINGS
# swift standard warnings
win32-msvc*:QMAKE_CXXFLAGS_WARN_ON *= /wd4351 /wd4661
msvc:QMAKE_CXXFLAGS_WARN_ON *= /wd4351 /wd4661
# elevated warnings
# win32-msvc*:QMAKE_CXXFLAGS_WARN_ON *= /Wall /wd4640 /wd4619 /wd4350 /wd4351 /wd4946 /wd4510 /wd4820 /wd4571 /wd4625 /wd4626 /wd4127
contains(BLACK_CONFIG, AllowNoisyWarnings) {
clang {
QMAKE_CXXFLAGS_WARN_ON *= -Weverything --system-header-prefix=$$[QT_INSTALL_HEADERS]
QMAKE_CXXFLAGS_WARN_ON += -Wno-system-headers -Wno-c++98-compat-pedantic -Wno-class-varargs -Wno-covered-switch-default
QMAKE_CXXFLAGS_WARN_ON += -Wno-documentation -Wno-documentation-unknown-command -Wno-double-promotion -Wno-exit-time-destructors
QMAKE_CXXFLAGS_WARN_ON += -Wno-gnu -Wno-missing-prototypes -Wno-newline-eof -Wno-padded -Wno-undefined-reinterpret-cast
QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-macros -Wno-used-but-marked-unused -Wno-weak-template-vtables
}
else:msvc {
QMAKE_CXXFLAGS_WARN_ON *= /Wall
QMAKE_CXXFLAGS_WARN_ON += /wd4640 /wd4619 /wd4350 /wd4351 /wd4946 /wd4510 /wd4820 /wd4571 /wd4625 /wd4626 /wd4127
DEFINES *= QT_CC_WARNINGS
QMAKE_CXXFLAGS_WARN_ON *= /wd4251 /wd4275 /wd4514 /wd4800 /wd4097 /wd4706 /wd4710 /wd4530
}
}
# gcc 5 can warn about missing override keyword
g++ {