[build] make Xcode use the correct compiler when it is installed in a non-standard location
This commit is contained in:
4
scripts/launch-c-xcode.in
Normal file
4
scripts/launch-c-xcode.in
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CCACHE_CPP2=true
|
||||
exec "@C_LAUNCHER@" "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "$@"
|
||||
@@ -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@" "$@"
|
||||
|
||||
4
scripts/launch-cxx-xcode.in
Normal file
4
scripts/launch-cxx-xcode.in
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
export CCACHE_CPP2=true
|
||||
exec "@CXX_LAUNCHER@" "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "$@"
|
||||
@@ -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@" "$@"
|
||||
|
||||
Reference in New Issue
Block a user