Last active
December 9, 2015 21:08
-
-
Save kirb/4328579 to your computer and use it in GitHub Desktop.
iOS 6 SDK + theos + clang user preferences file for SublimeClang
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export THEOS=/opt/theos | |
export SDK=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk | |
if [[ "$1" =~ \.xi?m?$ ]]; then | |
file="$(mktemp /tmp/temp.mm.XXXXXX)" | |
isLogos=1 | |
$THEOS/logos.pl "$1" > "$name" || exit 1 | |
else | |
file="$1" | |
isLogos=0 | |
fi | |
xcrun -sdk iphoneos clang++ --analyze -o - -x objective-c++ -c -DTARGET_IPHONE=1 -O2 -I"$THEOS"/include -include "$THEOS"/Prefix.pch -Wall -Werror -isysroot "$SDK" -arch armv7 -D__IPHONE_OS_VERSION_MIN_REQUIRED=__IPHONE_4_3 -miphoneos-version-min=4.3 "$file" | |
[[ "$isLogos" == "1" ]] && rm "$file" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"analyzer_commandline": [ | |
"clangalyze" | |
], | |
"options": [], | |
"analyzer_extensions": [ | |
"cpp", | |
"c", | |
"cc", | |
"m", | |
"mm", | |
"x", | |
"xi", | |
"xm", | |
"xim" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment