Fix broken build with Clang < 3.4 after 60aed669345be33b916c445565
authorThiago Macieira <thiago.macieira@intel.com>
Wed, 8 Jan 2014 15:11:41 +0000 (07:11 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 8 Jan 2014 22:41:01 +0000 (23:41 +0100)
The -Wunused-const-variable option was added in Clang 3.4 and is not yet
supported on Apple's Clang. This test needs to be extended with the
Apple Clang version that supports the option.

Change-Id: Ief6ece91f1c0200c3359e74dafca4b893fcde7ca
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
src/qml/qml.pro

index d0f6556..79e83a1 100644 (file)
@@ -21,7 +21,8 @@ QMAKE_DOCS = $$PWD/doc/qtqml.qdocconf
 # 2415: variable "xx" of static storage duration was declared but never referenced
 # unused variable 'xx' [-Werror,-Wunused-const-variable]
 intel_icc: WERROR += -ww2415
-clang: WERROR += -Wno-error=unused-const-variable
+clang:if(greaterThan(QT_CLANG_MAJOR_VERSION, 3)|greaterThan(QT_CLANG_MINOR_VERSION, 3)): \
+    WERROR += -Wno-error=unused-const-variable
 
 load(qt_module)