summaryrefslogtreecommitdiffstats
path: root/CIbuild.sh
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2019-11-10 17:55:24 +0100
committerGitHub <noreply@github.com>2019-11-10 17:55:24 +0100
commit7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde (patch)
tree44771843fd254e706d17184686d736bd97daf665 /CIbuild.sh
parentMoved growing from cWorld / cChunk to cBlockHandler descendants. (diff)
downloadcuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.tar
cuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.tar.gz
cuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.tar.bz2
cuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.tar.lz
cuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.tar.xz
cuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.tar.zst
cuberite-7996571a6d9c3c2bbc771974dfd7f7b45b7ddbde.zip
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;