summaryrefslogtreecommitdiffstats
path: root/CIbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'CIbuild.sh')
-rwxr-xr-xCIbuild.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/CIbuild.sh b/CIbuild.sh
index 024457675..9f2145624 100755
--- a/CIbuild.sh
+++ b/CIbuild.sh
@@ -6,7 +6,14 @@ export CUBERITE_BUILD_SERIES_NAME="Travis $CC $TRAVIS_CUBERITE_BUILD_TYPE"
export CUBERITE_BUILD_ID=$TRAVIS_JOB_NUMBER
export CUBERITE_BUILD_DATETIME=`date`
-cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1;
+# Use ccache if available
+if [ `which ccache` ]; then
+ export CCACHE_CPP2=true
+ CACHE_ARGS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
+ echo "Using ccache installed at $(which ccache)"
+fi
+
+cmake . -DBUILD_TOOLS=1 -DSELF_TEST=1 ${CACHE_ARGS};
echo "Building..."
cmake --build . -- -j 2;