diff options
| author | Mike Taves <mwtoews@gmail.com> | 2021-11-19 23:55:09 +1300 |
|---|---|---|
| committer | Mike Taves <mwtoews@gmail.com> | 2021-11-20 00:56:48 +1300 |
| commit | dd74dd05a055cb882388862f8a3fe6e3ba4b194b (patch) | |
| tree | d37a8707018c670852b53a99c462408625be37a6 /travis/install.sh | |
| parent | ac882266b57d04720bb645b8144901127f7427cf (diff) | |
| download | PROJ-dd74dd05a055cb882388862f8a3fe6e3ba4b194b.tar.gz PROJ-dd74dd05a055cb882388862f8a3fe6e3ba4b194b.zip | |
CMake: add option USE_CCACHE=OFF to use ccache to compile C/C++ objs
Diffstat (limited to 'travis/install.sh')
| -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..8a9a6f72 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 |
