From c67dbe4b2383c04a2c88a25e41a79717fdada3c0 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Sun, 1 Jan 2017 20:44:52 +0100 Subject: [PATCH] Travis: build with Ninja Because after making fully parallel builds possible we'd better start using them to keep testing them. --- .travis.yml | 4 ++++ travis.sh | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 271692c6..81e90f32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,10 @@ addons: - libboost-program-options-dev - libboost-test-dev - google-mock + - ninja-build + +before_install: + - if [[ "${TRAVIS_OS_NAME}" = "osx" ]]; then brew update && brew install ninja; fi script: ./travis.sh diff --git a/travis.sh b/travis.sh index bd864b3c..79b7812c 100755 --- a/travis.sh +++ b/travis.sh @@ -4,11 +4,12 @@ gem install bundler bundle install cmake -E make_directory build -if [ -z ${GMOCK_PATH+x} ]; then - cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on -DGMOCK_VER=${GMOCK_VER} .. -else - cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on -DGMOCK_SRC_DIR=${GMOCK_PATH} .. -fi +cmake -E chdir build cmake \ + -G Ninja \ + -DCUKE_ENABLE_EXAMPLES=on \ + ${GMOCK_PATH:-"-DGMOCK_VER=${GMOCK_VER}"} \ + ${GMOCK_PATH:+"-DGMOCK_SRC_DIR=${GMOCK_PATH}"} \ + .. cmake --build build cmake --build build --target test cmake --build build --target features