From d2243e4ddb7fb8022f7e84808e40e978acd72f28 Mon Sep 17 00:00:00 2001 From: William Dawson Date: Wed, 15 Nov 2023 14:21:56 +0900 Subject: [PATCH] I think my build conditionals are wrong --- UnitTests/run_cmake.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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