diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-12-21 18:31:54 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-28 23:43:36 +0100 |
commit | ebfd85a499a4382ace09d443b1f35cd6b1848af6 (patch) | |
tree | 3d957d0d57b49ee34b82a60f316ab5bb88e7e013 /configure | |
parent | 0520631b2ba04fb99d3d46385f04279cd89a7732 (diff) |
Add the infrastructure to compile Qt with -Werror
This is enabled only for -developer-builds and only for certain
compiler-version combinations that are in a whitelist.
It also requires each library, plugin or tool to declare whether it is
supposedly clean of warnings. When most targets are clean, we can
consider inverting.
Change-Id: I17b5c4e45aee5078f9788e846a45d619c144095a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -2,6 +2,7 @@ ############################################################################# ## ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +## Copyright (C) 2013 Intel Corporation. ## Contact: http://www.qt-project.org/legal ## ## This file is the build configuration utility of the Qt Toolkit. @@ -893,6 +894,7 @@ CFG_PCRE=auto QPA_PLATFORM_GUARD=yes CFG_CXX11=auto CFG_DIRECTWRITE=no +CFG_WERROR=auto # initalize variables used for installation QT_INSTALL_PREFIX= @@ -2138,6 +2140,13 @@ while [ "$#" -gt 0 ]; do UNKNOWN_OPT=yes fi ;; + warnings-are-errors|Werror) + if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then + CFG_WERROR="$VAL" + else + UNKNOWN_OPT=yes + fi + ;; *) UNKNOWN_OPT=yes ;; @@ -3296,6 +3305,10 @@ Additional options: * -no-system-proxies .. Do not use system network proxies by default. -system-proxies ..... Use system network proxies by default. + -no-warnings-are-errors Make warnings be treated normally + -warnings-are-errors Make warnings be treated as errors + (enabled if -developer-build is active) + $GBN -no-glib ........... Do not compile Glib support. $GBY -glib .............. Compile Glib support. EOF @@ -6098,6 +6111,11 @@ else fi if [ "$CFG_DEV" = "yes" ]; then QT_CONFIG="$QT_CONFIG private_tests" + if [ "$CFG_WERROR" != "no" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors" + fi +elif [ "$CFG_WERROR" = "yes" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors" fi cat >>"$QTCONFIG.tmp" <<EOF |