From c7934218d7bfcba408b725c41fab1f3d5d890162 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Tue, 5 Sep 2023 05:38:33 +0200 Subject: test --- build_and_test.sh | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/build_and_test.sh b/build_and_test.sh index c624c68..5416fa3 100644 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -7,9 +7,7 @@ COMPILEPP=g++ OBJ_POSTFIX=.o EXE_POSTFIX= -UNAME=$(uname) - -case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in +case $(uname | tr '[:upper:]' '[:lower:]') in *darwin*) if command -v clang >/dev/null 2>&1; then echo "C compiler found - Clang" @@ -17,6 +15,9 @@ case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in COMPILEPP=clang elif command -v gcc >/dev/null 2>&1; then echo "C compiler found - GCC" + else + echo "C compiler not found" + exit 1 fi ;; *msys*|*cygwin*|*mingw*|*nt*|*win*) @@ -33,27 +34,13 @@ case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in echo "C compiler found - Clang" COMPILE=clang COMPILEPP=clang + else + echo "C compiler not found" + exit 1 fi ;; esac -if command -v cl.exe >/dev/null 2>&1; then - echo "C compiler found - MSVC" - COMPILE=cl.exe - COMPILEPP=cl.exe - OBJ_POSTFIX=.obj - EXE_POSTFIX=.exe -elif command -v gcc >/dev/null 2>&1; then - echo "C compiler found - GCC" -elif command -v clang >/dev/null 2>&1; then - echo "C compiler found - Clang" - COMPILE=clang - COMPILEPP=clang -else - echo "C compiler not found" - exit 1 -fi - echo "" $COMPILE -c -o "build/kit${OBJ_POSTFIX}" "source/kit/_static.c" -- cgit v1.2.3