Skip to content
Permalink
Browse files

Do not enable warnings-as-errors by default.

While we would like to have warnings always be treated
as errors, enabling it will surely cause headaches for
packagers. Different compiler versions behave differently,
and it could potentially turn out top be very annoying for
distro packagers if they try to build an older version of
Mumble using a compiler that we had not anticipated being
used for building Mumble (a newer version of GCC, for
example).

Because of that, we disable warnings-as-errors by default.

Our own binary builds will, of course, enable it
warnings-as-errors to ensure we don't miss anything.

The CI system will also always use it. That should
hopefully also ensure we haven't overlooked anything
on platforms where we don't provide binary builds
ourselves.

Fixes #2113
  • Loading branch information...
mkrautz committed Mar 13, 2016
1 parent 9b889ca commit a59e166c9b4bfe1d4edded7ec8ce3a6870cd2843
Showing with 2 additions and 7 deletions.
  1. +2 −7 compiler.pri
@@ -83,14 +83,9 @@ win32 {
QMAKE_CXXFLAGS_DEBUG *= /analyze
QMAKE_CFLAGS_RELEASE *= /analyze
QMAKE_CXXFLAGS_RELEASE *= /analyze

# Do not treat warnings as errors when
# running the static analyzer.
# Otherwise, we won't get very far!
CONFIG *= no-warnings-as-errors
}

!CONFIG(no-warnings-as-errors) {
CONFIG(warnings-as-errors) {
QMAKE_CFLAGS *= -WX
QMAKE_CXXFLAGS *= -WX
QMAKE_LFLAGS *= -WX
@@ -203,7 +198,7 @@ unix {
QMAKE_OBJECTIVE_CFLAGS *= -Wall -Wextra
QMAKE_OBJECTIVE_CXXFLAGS *= -Wall -Wextra

!CONFIG(no-warnings-as-errors) {
CONFIG(warnings-as-errors) {
QMAKE_CFLAGS *= -Werror
QMAKE_CXXFLAGS *= -Werror
QMAKE_OBJECTIVE_CFLAGS *= -Werror

0 comments on commit a59e166

Please sign in to comment.
You can’t perform that action at this time.