Skip to content

Commit a213fad

Browse files
lbartoletti3nids
authored andcommittedApr 4, 2018
Fix travis with ccache (#6745)
1 parent 9cece3e commit a213fad

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed
 

‎.ci/travis/code_layout/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ export CORES=2
1818
mkdir build
1919
pushd build
2020

21-
cmake -DWITH_CORE=OFF -DWITH_APIDOC=ON -DWITH_ASTYLE=ON -DENABLE_TESTS=ON ..
21+
cmake -DUSE_CCACHE=OFF -DWITH_CORE=OFF -DWITH_APIDOC=ON -DWITH_ASTYLE=ON -DENABLE_TESTS=ON ..
2222

2323
popd

‎.ci/travis/linux/docker-build-test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ echo "travis_fold:start:cmake"
3939
echo "${bold}Running cmake...${endbold}"
4040
cmake \
4141
-GNinja \
42+
-DUSE_CCACHE=OFF \
4243
-DWITH_3D=ON \
4344
-DWITH_STAGED_PLUGINS=ON \
4445
-DWITH_GRASS=OFF \

‎CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,14 @@ SET(CMAKE_COLOR_MAKEFILE ON)
2929
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
3030

3131
# Configure CCache if available
32-
find_program(CCACHE_FOUND ccache)
33-
if(CCACHE_FOUND)
34-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
35-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
36-
endif(CCACHE_FOUND)
32+
option(USE_CCACHE "Use ccache" ON)
33+
if (USE_CCACHE)
34+
find_program(CCACHE_FOUND ccache)
35+
if(CCACHE_FOUND)
36+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
37+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
38+
endif(CCACHE_FOUND)
39+
endif()
3740

3841
# in generated makefiles use relative paths so the project dir is moveable
3942
# Note commented out since it cause problems but it would be nice to resolve these and enable

0 commit comments

Comments
 (0)
Please sign in to comment.