diff --git a/.travis.yml b/.travis.yml index 30393279f088810595f204cfd763f4f27d8db57a..985185dd1036ee00d4792739f7f01c27a7bd3a22 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 f98d9207c3c8b0b0b312e975988732221fdd0599..7a5fbcff337bca4ba30b4f3dcc2f6287308e038c 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