summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-07-17 15:22:09 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-07-18 11:54:14 +0200
commit698542cf459e51cd72f7bc46b6979a9d67b33309 (patch)
tree651e201fabf53841a7390b11d62d3b7e2f71e389 /scripts
parentb5c0bf1b8d18bb79ce393ac38b2e55a74863071c (diff)
downloadqtlocation-mapboxgl-698542cf459e51cd72f7bc46b6979a9d67b33309.tar.gz
[build] make Xcode use the correct compiler when it is installed in a non-standard location
Diffstat (limited to 'scripts')
-rw-r--r--scripts/launch-c-xcode.in4
-rw-r--r--scripts/launch-c.in8
-rw-r--r--scripts/launch-cxx-xcode.in4
-rw-r--r--scripts/launch-cxx.in8
4 files changed, 10 insertions, 14 deletions
diff --git a/scripts/launch-c-xcode.in b/scripts/launch-c-xcode.in
new file mode 100644
index 0000000000..77a0c8aca3
--- /dev/null
+++ b/scripts/launch-c-xcode.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+export CCACHE_CPP2=true
+exec "@C_LAUNCHER@" "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" "$@"
diff --git a/scripts/launch-c.in b/scripts/launch-c.in
index 6c6c9180bc..94555f32aa 100644
--- a/scripts/launch-c.in
+++ b/scripts/launch-c.in
@@ -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@" "$@"
diff --git a/scripts/launch-cxx-xcode.in b/scripts/launch-cxx-xcode.in
new file mode 100644
index 0000000000..7d4639ce6d
--- /dev/null
+++ b/scripts/launch-cxx-xcode.in
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+export CCACHE_CPP2=true
+exec "@CXX_LAUNCHER@" "${DEVELOPER_DIR}/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" "$@"
diff --git a/scripts/launch-cxx.in b/scripts/launch-cxx.in
index 23f107ce48..46671c1c64 100644
--- a/scripts/launch-cxx.in
+++ b/scripts/launch-cxx.in
@@ -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}" "$@" \ No newline at end of file
+exec "@CXX_LAUNCHER@" "$@"