[build] make Xcode use the correct compiler when it is installed in a non-standard location

This commit is contained in:
Konstantin Käfer
2017-07-17 15:22:09 +02:00
parent b5c0bf1b8d
commit 698542cf45
6 changed files with 19 additions and 21 deletions

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export CCACHE_CPP2=true
exec "@C_LAUNCHER@" "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "$@"

View File

@@ -1,10 +1,4 @@
#!/bin/sh
# Xcode generator doesn't include the compiler as the
# first argument, Ninja and Makefiles do. Handle both cases.
if [ "$1" = "${CMAKE_C_COMPILER}" ] ; then
shift
fi
export CCACHE_CPP2=true
exec "${C_LAUNCHER}" "${CMAKE_C_COMPILER}" "$@"
exec "@C_LAUNCHER@" "$@"

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export CCACHE_CPP2=true
exec "@CXX_LAUNCHER@" "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "$@"

View File

@@ -1,10 +1,4 @@
#!/bin/sh
# Xcode generator doesn't include the compiler as the
# first argument, Ninja and Makefiles do. Handle both cases.
if [ "$1" = "${CMAKE_CXX_COMPILER}" ] ; then
shift
fi
export CCACHE_CPP2=true
exec "${CXX_LAUNCHER}" "${CMAKE_CXX_COMPILER}" "$@"
exec "@CXX_LAUNCHER@" "$@"