From: Allan Sandfeld Jensen Date: Fri, 30 Jan 2015 10:54:44 +0000 (+0100) Subject: Update C++11 warning logic from QtWebKit X-Git-Tag: v5.5.90+alpha1~3^2~242^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd395141f00ef0fc72e2d6b7da0c6397324036a3;p=platform%2Fupstream%2Fqtdeclarative.git Update C++11 warning logic from QtWebKit Fixes compatibility with gcc 5.0. Change-Id: I017c6d690c1f64359c3bac6c8b6b0f5e089861eb Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- diff --git a/src/3rdparty/masm/masm.pri b/src/3rdparty/masm/masm.pri index 3fd4aa6..3655af3 100644 --- a/src/3rdparty/masm/masm.pri +++ b/src/3rdparty/masm/masm.pri @@ -71,18 +71,16 @@ retgen.commands = python $$retgen.script > ${QMAKE_FILE_OUT} QMAKE_EXTRA_COMPILERS += retgen # Taken from WebKit/Tools/qmake/mkspecs/features/unix/default_post.prf -linux-g++* { - greaterThan(QT_GCC_MAJOR_VERSION, 3):greaterThan(QT_GCC_MINOR_VERSION, 5) { - !contains(QMAKE_CXXFLAGS, -std=(c|gnu)\\+\\+(0x|11)) { +!c++11:!intel_icc { + # Don't warn about OVERRIDE and FINAL, since they are feature-checked anyways + clang { + QMAKE_CXXFLAGS += -Wno-c++11-extensions -Wno-c++0x-extensions + QMAKE_OBJECTIVE_CFLAGS += -Wno-c++11-extensions -Wno-c++0x-extensions + } else: gcc { + greaterThan(QT_GCC_MAJOR_VERSION, 4)|greaterThan(QT_GCC_MINOR_VERSION, 5) { # We need to deactivate those warnings because some names conflicts with upcoming c++0x types (e.g.nullptr). QMAKE_CXXFLAGS_WARN_ON += -Wno-c++0x-compat QMAKE_CXXFLAGS += -Wno-c++0x-compat } } } - -# Don't warn about OVERRIDE and FINAL, since they are feature-checked anyways -*clang:!contains(QMAKE_CXXFLAGS, -std=c++11) { - QMAKE_CXXFLAGS += -Wno-c++11-extensions - QMAKE_OBJECTIVE_CFLAGS += -Wno-c++11-extensions -}