Change-Id: Ibeb1db0eca2fb6d843d85c3f48c5f23a81230745
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
Darwin:*)
if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
- PLATFORM=macx-g++
- # PLATFORM=macx-xcode
+ OSX_VERSION=`uname -r | cut -d. -f1`
+ if [ "$OSX_VERSION" -ge 11 ]; then
+ # We're on Lion or above. Check if we have a supported Clang version
+ case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in
+ 3.*)
+ PLATFORM=macx-clang
+ PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
+ ;;
+ *)
+ PLATFORM=macx-g++
+ ;;
+ esac
+ else
+ PLATFORM=macx-g++
+ fi
else
PLATFORM=darwin-g++
fi