summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2013-03-21 13:21:33 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-23 04:33:11 +0100
commit93acff78831be7a6a69613306ad96a74752f13cd (patch)
treee58278a4aadbfa40ae88ceaae1b0ac984406de7d /configure
parentd4adee7851790dd6949424de083756f49af891db (diff)
Add support for the Clang compiler bundled with XCode
Since c45595d64831990311f92fcebc4e34e2797f5352, we use the toolchain based on the XCode SDK, not the one in $PATH. Turns out that the Clang that comes bundled with XCode 4.6 reports its version as Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) Instead of "Apple clang". So we need to match for (clang|LLVM). Extended regular expressions (with -E) were necessary because the sed that comes with Mac OS X is apparently broken and will not work with \(clang\|LLVM\). GNU sed accepts -E as an alias for -r, meaning extended regexps. Change-Id: I5a15de30721216b086c3d39a080cc6496c503985 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure8
1 files changed, 4 insertions, 4 deletions
diff --git a/configure b/configure
index 91f7c1a4fa..c66f1b66e3 100755
--- a/configure
+++ b/configure
@@ -6059,11 +6059,11 @@ if [ "$CFG_QML_DEBUG" = "no" ]; then
fi
case "$QMAKE_CONF_COMPILER" in
-*clang++*)
+*clang*)
# Clang
- COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n '
-/^Apple clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;}
-/^clang version /{s///; s/^\([0-9]*\)\.\([0-9]*\).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'`
+ COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n -E '
+/^Apple (clang|LLVM) version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;}
+/^clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'`
eval "$COMPILER_VERSION"
;;
*icpc)