From 9778c3bed39bd5de2f020d591800247a1856aab2 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Tue, 5 Sep 2023 05:32:56 +0200 Subject: test --- build_and_test.sh | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/build_and_test.sh b/build_and_test.sh index a7d7ff6..c624c68 100644 --- a/build_and_test.sh +++ b/build_and_test.sh @@ -9,7 +9,33 @@ EXE_POSTFIX= UNAME=$(uname) -echo "UNAME: ${UNAME}" +case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in + *darwin*) + if command -v clang >/dev/null 2>&1; then + echo "C compiler found - Clang" + COMPILE=clang + COMPILEPP=clang + elif command -v gcc >/dev/null 2>&1; then + echo "C compiler found - GCC" + fi + ;; + *msys*|*cygwin*|*mingw*|*nt*|*win*) + echo "C compiler found - MSVC" + COMPILE=cl.exe + COMPILEPP=cl.exe + OBJ_POSTFIX=.obj + EXE_POSTFIX=.exe + ;; + *) + if 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 + fi + ;; +esac if command -v cl.exe >/dev/null 2>&1; then echo "C compiler found - MSVC" -- cgit v1.2.3