summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2023-09-05 05:38:33 +0200
committerMitya Selivanov <automainint@guattari.tech>2023-09-05 05:38:33 +0200
commitc7934218d7bfcba408b725c41fab1f3d5d890162 (patch)
tree5506f897a9150d8e7216fe0e84f75f0a8d7679cb
parent9778c3bed39bd5de2f020d591800247a1856aab2 (diff)
downloadkit-c7934218d7bfcba408b725c41fab1f3d5d890162.zip
test
-rw-r--r--build_and_test.sh27
1 files 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"