mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Inhibit -Wsuggest-override in GCC 5, causes lots of warnings in Qt headers.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user