From 0bea4f26a990c8620d16eaf02e8595ba119c1b44 Mon Sep 17 00:00:00 2001 From: matta adrien <matta@lpccaen.in2p3.fr> Date: Mon, 10 Oct 2016 17:10:59 +0200 Subject: [PATCH] * trying to fix travis build with ninja --- .travis.yml | 1 + NPLib/scripts/test/simulation_build.sh | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30393279f..985185dd1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ before_install: install: script: + - cmake --version - cd $NPTOOL/NPLib - cmake -GNinja ./ - ninja-build install diff --git a/NPLib/scripts/test/simulation_build.sh b/NPLib/scripts/test/simulation_build.sh index f98d9207c..7a5fbcff3 100755 --- a/NPLib/scripts/test/simulation_build.sh +++ b/NPLib/scripts/test/simulation_build.sh @@ -5,12 +5,18 @@ set -ev # go to nps cd $NPTOOL/NPSimulation -cmake ./ -if [ -e Makefile ] -then - make install -else + +# Check if ninja or ninja-build is there, otherwise fall back on make +if hash ninja-build 2>/dev/null; then + cmake -GNinja ./ + ninja-build install +elif hash ninja 2>/dev/null; then + cmake -GNinja ./ ninja install +else + cmake ./ + make install fi + # minimal run npsimulation -h -- GitLab