From 2b2397a8f7d425dd546381d7516b3a73576ce17b Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Mon, 17 Apr 2017 13:20:05 -0400 Subject: [PATCH] =?UTF-8?q?Gotta=20handle=20old=20versions=20of=20Xcode=20?= =?UTF-8?q?that=20don=E2=80=99t=20know=20anything=20about=20that.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QGCCommon.pri | 4 +++- tools/get_xcode_version.sh | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 tools/get_xcode_version.sh diff --git a/QGCCommon.pri b/QGCCommon.pri index 98bbffc74..c5dc4cb96 100644 --- a/QGCCommon.pri +++ b/QGCCommon.pri @@ -200,7 +200,9 @@ MacBuild | LinuxBuild { # Latest clang version has a buggy check for this which cause Qt headers to throw warnings on qmap.h QMAKE_CXXFLAGS_WARN_ON += -Wno-return-stack-address # Xcode 8.3 has issues on how MAVLink accesses (packed) message structure members. - QMAKE_CXXFLAGS_WARN_ON += -Wno-address-of-packed-member + # Note that this will fail when Xcode version reaches 10.x.x + XCODE_VERSION = $$system($$PWD/tools/get_xcode_version.sh) + greaterThan(XCODE_VERSION, 8.2.0): QMAKE_CXXFLAGS_WARN_ON += -Wno-address-of-packed-member } } diff --git a/tools/get_xcode_version.sh b/tools/get_xcode_version.sh new file mode 100755 index 000000000..1ba8bf132 --- /dev/null +++ b/tools/get_xcode_version.sh @@ -0,0 +1,3 @@ +#!/bin/bash +xcodebuild -version 2>&1 | (head -n1) | awk '{print $2}' + -- 2.22.0