mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Replace qmake variable BLACK_CONFIG with a system based on json files.
The config is loaded from json files by qmake, and we define the qmake function `swiftConfig` for checking whether a feature is enabled. This function can be directly used in `buildconfig_gen.cpp.in`, so the trick with C++ comment tokens in variables is not needed.
This commit is contained in:
@@ -7,7 +7,7 @@ gcc:QMAKE_CXXFLAGS_WARN_ON *= -Woverloaded-virtual
|
||||
gcc:QMAKE_CXXFLAGS_USE_PRECOMPILE = -Winvalid-pch $$QMAKE_CXXFLAGS_USE_PRECOMPILE
|
||||
|
||||
# elevated warnings
|
||||
contains(BLACK_CONFIG, AllowNoisyWarnings) {
|
||||
swiftConfig(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
|
||||
@@ -32,7 +32,7 @@ gcc {
|
||||
greaterThan(GCC_MAJOR, 5) {
|
||||
QMAKE_CXXFLAGS_WARN_ON *= -Wsuggest-override
|
||||
}
|
||||
greaterThan(GCC_MAJOR, 4):contains(BLACK_CONFIG, AllowNoisyWarnings) {
|
||||
greaterThan(GCC_MAJOR, 4):swiftConfig(allowNoisyWarnings) {
|
||||
QMAKE_CXXFLAGS_WARN_ON *= -Wsuggest-override
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user