From bcd01e8f60439fc548b559b1e88ce63e019000e5 Mon Sep 17 00:00:00 2001 From: ttroy50 Date: Sun, 14 Feb 2016 12:04:24 +0000 Subject: [PATCH] check if ninja supported by cmake --- 01-basic/J-building-with-ninja/run_test.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/01-basic/J-building-with-ninja/run_test.sh b/01-basic/J-building-with-ninja/run_test.sh index 4156cc3..56b171e 100755 --- a/01-basic/J-building-with-ninja/run_test.sh +++ b/01-basic/J-building-with-ninja/run_test.sh @@ -1,2 +1,11 @@ +#!/bin/bash +# Travis-ci cmake version doesn't support ninja, so first check if it's supported +ninja_supported=`cmake --help | grep Ninja` + +if [ -z $ninja_supported ]; then + echo "Ninja not supported" + exit +fi + mkdir -p build.ninja && cd build.ninja && \ cmake .. -G Ninja && ninja