summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"