Remove warnings-as-errors by default
Compiling C++ on various different platforms with as many out of tree dependencies as we have is volatile at best. In order to prevent a third party warning from ruining the build for people who don't care about third party warnings, we remove warnings-as-errors by default. They are still enabled by default on CI.
This commit is contained in:
committed by
username223
parent
44a5d3eed0
commit
5a7fe687d8
@@ -48,7 +48,10 @@ QMAKE_CXXFLAGS += -Wmost
|
||||
|
||||
QMAKE_CXXFLAGS += -Wpedantic
|
||||
|
||||
QMAKE_CXXFLAGS += -Werror
|
||||
warnings_as_errors {
|
||||
QMAKE_CXXFLAGS += -Werror
|
||||
}
|
||||
|
||||
#All includes from the third-party directory will not warn.
|
||||
QMAKE_CXXFLAGS += --system-header-prefix=third-party
|
||||
QMAKE_CXXFLAGS += --system-header-prefix=qt
|
||||
|
||||
@@ -27,7 +27,9 @@ include(clang-gcc-common-switches.pri)
|
||||
|
||||
QMAKE_CXXFLAGS += -Wpedantic
|
||||
|
||||
QMAKE_CXXFLAGS += -Werror
|
||||
warnings_as_errors {
|
||||
QMAKE_CXXFLAGS += -Werror
|
||||
}
|
||||
|
||||
# GCC only switches
|
||||
QMAKE_CXXFLAGS += -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wrestrict -Wnull-dereference
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
include(common-msvc.pri)
|
||||
|
||||
# Warnings as errors
|
||||
QMAKE_CXXFLAGS += /WX
|
||||
warnings_as_errors {
|
||||
# Warnings as errors
|
||||
QMAKE_CXXFLAGS += /WX
|
||||
}
|
||||
|
||||
# Enables Link Time Optimization
|
||||
QMAKE_CXXFLAGS += /GL
|
||||
|
||||
Reference in New Issue
Block a user