Skip to content

Commit

Permalink
Gotta handle old versions of Xcode that don’t know anything about that.
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmaphobic committed Apr 17, 2017
1 parent 109f5c8 commit 2b2397a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion QGCCommon.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

Expand Down
3 changes: 3 additions & 0 deletions tools/get_xcode_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
xcodebuild -version 2>&1 | (head -n1) | awk '{print $2}'

0 comments on commit 2b2397a

Please sign in to comment.