diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2023-09-05 05:32:56 +0200 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2023-09-05 05:32:56 +0200 |
commit | 9778c3bed39bd5de2f020d591800247a1856aab2 (patch) | |
tree | f9adb8fd1f647ecdd43cbced7ed06e181f53566c | |
parent | 4d5521774196debfce6f67a9d52bd6be338238be (diff) | |
download | kit-9778c3bed39bd5de2f020d591800247a1856aab2.zip |
test
-rw-r--r-- | build_and_test.sh | 28 |
1 files changed, 27 insertions, 1 deletions
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" |