diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-03-21 13:21:33 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-23 04:33:11 +0100 |
commit | 93acff78831be7a6a69613306ad96a74752f13cd (patch) | |
tree | e58278a4aadbfa40ae88ceaae1b0ac984406de7d /configure | |
parent | d4adee7851790dd6949424de083756f49af891db (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-x | configure | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |