diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-11-25 11:53:21 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-25 11:53:21 +0100 |
| commit | 3636c8f8e76be8bd9bf98810ead5ab1d77f6ecab (patch) | |
| tree | 93a162fe11cdde7bef8bcc4b73c2c52becad8b60 /travis | |
| parent | e93e86ce405fb642ba74c150d5a4661f68214c22 (diff) | |
| parent | cd07dcf0c4b60860188fc7829ebd20df835c68d4 (diff) | |
| download | PROJ-3636c8f8e76be8bd9bf98810ead5ab1d77f6ecab.tar.gz PROJ-3636c8f8e76be8bd9bf98810ead5ab1d77f6ecab.zip | |
Merge pull request #2948 from mwtoews/cmake-ccache
CMake: add option USE_CCACHE=OFF to use ccache to compile C/C++ objs
Diffstat (limited to 'travis')
| -rwxr-xr-x | travis/install.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/travis/install.sh b/travis/install.sh index d0b4d9cb..916f554d 100755 --- a/travis/install.sh +++ b/travis/install.sh @@ -139,11 +139,24 @@ if [ "$BUILD_NAME" != "linux_gcc8" -a "$BUILD_NAME" != "linux_gcc_32bit" ]; then VERBOSE=1 make >/dev/null cd ../.. + # Use ccache if it's available + if command -v ccache &> /dev/null + then + USE_CCACHE=ON + ccache -s + else + USE_CCACHE=OFF + fi + # Regular build mkdir build_cmake cd build_cmake - cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install - VERBOSE=1 make >/dev/null + cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/proj_cmake_install -DUSE_CCACHE=${USE_CCACHE} + make >/dev/null + if [ "${USE_CCACHE}" = "ON" ]; then + ccache -s + fi + make install >/dev/null ctest find /tmp/proj_cmake_install |
