diff --git a/UnitTests/run_cmake.sh b/UnitTests/run_cmake.sh index 41e08975..5c324b2e 100644 --- a/UnitTests/run_cmake.sh +++ b/UnitTests/run_cmake.sh @@ -10,15 +10,14 @@ if [[ "$TESTOS" == "OSX" ]]; then cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=../Targets/Mac-python3.cmake \ -DCMAKE_BUILD_TYPE=Release ; else - if [ ! -z ${NOIALLGATHER+x} ]; then - cmake -G Ninja .. \ - -DCMAKE_BUILD_TYPE=Debug -DNOIALLGATHER=YES; - elif [ ! -z ${DEBUG+x} ]; then + if [[ "${NOIALLGATHER:-0}" -eq 1 ]]; then + cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug -DNOIALLGATHER=YES; + elif [[ "${DEBUG:-0}" -eq 1 ]]; then cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=../Targets/Linux.cmake \ - -DCMAKE_BUILD_TYPE=Debug ; + -DCMAKE_BUILD_TYPE=Debug; else cmake -G Ninja .. -DCMAKE_TOOLCHAIN_FILE=../Targets/Linux.cmake \ - -DCMAKE_BUILD_TYPE=Release ; + -DCMAKE_BUILD_TYPE=Release; fi fi