mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 08:55:43 +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 {
|
||||||
GCC_VERSION = $$system($$QMAKE_CXX -dumpversion)
|
GCC_VERSION = $$system($$QMAKE_CXX -dumpversion)
|
||||||
GCC_MAJOR = $$section(GCC_VERSION, ., 0, 0)
|
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
|
QMAKE_CXXFLAGS_WARN_ON *= -Wsuggest-override
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user