Append -W* configure flags to QMAKE_C*FLAGS_WARN_ON
authorBradley T. Hughes <bradley.hughes@nokia.com>
Fri, 28 Oct 2011 18:05:34 +0000 (20:05 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 1 Nov 2011 08:23:40 +0000 (09:23 +0100)
... instead of adding them to all C*FLAGS. This makes it
possible to pass -Wno-warning-name to configure to disable
certain warnings enabled by default (which didn't work
previously). This also has the added benefit that only projects
that have CONFIG+=warn_on will get the extra warning flags.

Change-Id: I7bbc100155e02e7ccb9ac3be14bd8f585b7bc39b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
configure

index 738e157..f001e75 100755 (executable)
--- a/configure
+++ b/configure
@@ -7410,9 +7410,9 @@ fi
 
 if [ '!' -z "$W_FLAGS" ]; then
     # add the user defined warning flags
-    QMakeVar add QMAKE_CFLAGS "$W_FLAGS"
-    QMakeVar add QMAKE_CXXFLAGS "$W_FLAGS"
-    QMakeVar add QMAKE_OBJECTIVE_CFLAGS "$W_FLAGS"
+    QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
+    QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
+    QMakeVar add QMAKE_OBJECTIVE_CFLAGS_WARN_ON "$W_FLAGS"
 fi
 
 # turn off exceptions for the compilers that support it