From 8002815e2ce40bde81a5fd80b8c4102f0387a5cc Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Thu, 13 Mar 2014 21:35:26 -0700 Subject: [PATCH] Turn off warnings as errors as default Also changed WarningsAsErrorsOff to WarningsAsErrorsOn to be used by TeamCity builds. --- qgroundcontrol.pro | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index c601a2b33..ffa3726bb 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -130,34 +130,16 @@ WindowsBuild { } # -# We treat all warnings as errors which must be fixed before pull requests are approved. If you run into a problem -# you can't fix you can always use local pragmas to work around the warning. This should be used sparingly and only -# in cases where the problem absolultey can't be fixed. +# By default warnings as errors are turned off. Even so, in order for a pull request +# to be accepted you must compile cleanly with warnings as errors turned on the default +# set of OS builds. See http://www.qgroundcontrol.org/dev/contribute for more details. +# You can use the WarningsAsErrorsOn CONFIG switch to turn warnings as errors on for your +# own builds. # -# If you run into problems in code which is not yours, please lend a hand and fix the issues. If you don't have time -# for that post an Issue with your OS and compiler information as well as the pertinent output from the build log. If it's -# a problem that will take longer to fix, we will temporarily turn off warnings as errors for that specific config until -# the Issue is taken care of. Once that is completed we will turn warnings as errors back in for the config. You can use -# CONFIG+=WarningsAsErrorsOff in your private builds for a quick local override. -# -# Please report any problems you run into with warnings as errors so we can gather information on its effectiveness as well -# as its annoyance level. -# - -# Note: -Werror is currently not turned on for Linux due to unfixed problems with release builds. See Issue 535. This will -# be removed once the Issue is taken care of. -# Note: -Werror is also not turned on for Mac because Qt Core throws unused variable warnings for Mac from multiple header files. - -MacBuild | LinuxBuild { - CONFIG += WarningsAsErrorsOff -} MacBuild | LinuxBuild { QMAKE_CXXFLAGS_WARN_ON += -Wall -} - -MacBuild | LinuxBuild { - !WarningsAsErrorsOff { + WarningsAsErrorsOn { QMAKE_CXXFLAGS_WARN_ON += -Werror } } @@ -166,10 +148,9 @@ WindowsBuild { QMAKE_CXXFLAGS_WARN_ON += /W3 \ /wd4996 \ # silence warnings about deprecated strcpy and whatnot /wd4290 # ignore exception specifications -} - -WindowsBuild : !WarningsAsErrorsOff { - QMAKE_CXXFLAGS_WARN_ON += /WX + WarningsAsErrorsOn { + QMAKE_CXXFLAGS_WARN_ON += /WX + } } # -- 2.22.0