Skip to content

Commit

Permalink
Enable ccache to speed up travis builds
Browse files Browse the repository at this point in the history
  • Loading branch information
gdevenyi committed Jul 28, 2016
1 parent fa5564d commit 63d11dd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,30 @@ os:

language: cpp

cache: ccache

compiler:
- clang
- gcc

addons:
apt:
sources:
- george-edison55-precise-backports
packages:
- cmake
- cmake-data

before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.0-rc1-Linux-x86_64.sh; sh cmake-3.4.0-rc1-Linux-x86_64.sh --skip-license --prefix=${HOME}; export PATH=$HOME/bin/:$PATH; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then echo "need cmake 3.2"; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update && brew install ccache; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- mkdir antsbin
- cd antsbin

script:
- cmake -DRUN_LONG_TESTS=OFF -DRUN_SHORT_TESTS=ON ./.. && make -j 2 && cd ANTS-build/ && make test

notifications:
email:
recipients:
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 2.8.9)
cmake_policy(VERSION 2.8.9)

find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif()

set(LIBRARY_SOVERSION_INFO 2)
set(LIBRARY_VERSION_INFO 2.1.0)

Expand Down

0 comments on commit 63d11dd

Please sign in to comment.