From 8f80019b782721fb11049e9d67c32c4a16834b7a Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 1 Apr 2020 20:47:25 +0100 Subject: Don't build using ccache when it doesn't exist --- jenkinsbuild.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'jenkinsbuild.sh') diff --git a/jenkinsbuild.sh b/jenkinsbuild.sh index 5e6f4818d..07531deb7 100755 --- a/jenkinsbuild.sh +++ b/jenkinsbuild.sh @@ -56,8 +56,11 @@ export CUBERITE_BUILD_SERIES_NAME="$SERVERNAME $TARGET $COMPILEMODE ($BRANCH)" export CUBERITE_BUILD_ID="$BUILDID" export CUBERITE_BUILD_DATETIME="`date`" -export CCACHE_CPP2=true -CACHE_ARGS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" +if ! [ -x "$(command -v ccache)" ] +then + export CCACHE_CPP2=true + CACHE_ARGS="-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache" +fi # Build CXX=$CXXCOMP CC=$CCOMP cmake . -DNO_NATIVE_OPTIMIZATION=1 -DBUILD_TOOLS=1 ${CACHE_ARGS} ${TOOLCHAINFILE} ${COMPILEMODE} ${FORCE32} -- cgit v1.2.3