Inhibit -Wsuggest-override in GCC 5, causes lots of warnings in Qt headers.

This commit is contained in:
Mathew Sutcliffe
2017-02-19 01:14:15 +00:00
parent 65b0443cfa
commit 01ccb4d023

View File

@@ -23,11 +23,15 @@ contains(BLACK_CONFIG, AllowNoisyWarnings) {
}
}
# gcc 5 can warn about missing override keyword
# gcc 5 can warn about missing override keyword,
# gcc 6 can do it without thousands of warnings in qt headers
gcc {
GCC_VERSION = $$system($$QMAKE_CXX -dumpversion)
GCC_MAJOR = $$section(GCC_VERSION, ., 0, 0)
greaterThan(GCC_MAJOR, 4) {
greaterThan(GCC_MAJOR, 5) {
QMAKE_CXXFLAGS_WARN_ON *= -Wsuggest-override
}
greaterThan(GCC_MAJOR, 4):contains(BLACK_CONFIG, AllowNoisyWarnings) {
QMAKE_CXXFLAGS_WARN_ON *= -Wsuggest-override
}
}