From 531ced363c583b7341fc0372a9b82e5795f4b928 Mon Sep 17 00:00:00 2001 From: walker0643 <> Date: Thu, 1 Feb 2018 18:42:21 -0500 Subject: [PATCH] clean_build: try cmake3 before cmake --- clean_build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clean_build b/clean_build index 7f5fc58e..c6510340 100755 --- a/clean_build +++ b/clean_build @@ -3,6 +3,10 @@ cd "$(dirname $0)" || exit 1 rm -rf build mkdir build || exit 1 cd build || exit 1 -cmake -D CMAKE_BUILD_TYPE=Debug .. || exit 1 +# some environments have cmake v2 as 'cmake' and v3 as 'cmake3' +# check for cmake3 first then fallback to just cmake +CMAKE=`which cmake3 2>/dev/null` +[ $? -ne 0 -o "x$CMAKE" = "x" ] && CMAKE=cmake +$CMAKE -D CMAKE_BUILD_TYPE=Debug .. || exit 1 make || exit 1 echo "Build completed successfully"