summaryrefslogtreecommitdiff
path: root/scripts/ci/ccache-cxx.in
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci/ccache-cxx.in')
-rw-r--r--scripts/ci/ccache-cxx.in9
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/ci/ccache-cxx.in b/scripts/ci/ccache-cxx.in
new file mode 100644
index 0000000000..81831ad4dc
--- /dev/null
+++ b/scripts/ci/ccache-cxx.in
@@ -0,0 +1,9 @@
+#!/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
+
+exec "${CXX_LAUNCHER}" "${CMAKE_CXX_COMPILER}" "$@"