diff --git a/make.sh b/make.sh index dd07843..66e1f5c 100755 --- a/make.sh +++ b/make.sh @@ -32,11 +32,15 @@ build () { $CC "$i" -o "$OUT/test_$(echo $i | awk -F. '{print $1}' | awk -F/ '{print $NF}')" $FLAGS echo "Fait." done - for i in "test/"*".cu"; do - echo "Compilation de $i" - nvcc "$i" -o "$OUT/test_$(echo $i | awk -F. '{print $1}' | awk -F/ '{print $NF}')" - echo "Fait." - done + if ! command -v nvcc &> /dev/null; then + echo "Tests CUDA évités" + else + for i in "test/"*".cu"; do + echo "Compilation de $i" + nvcc "$i" -o "$OUT/test_$(echo $i | awk -F. '{print $1}' | awk -F/ '{print $NF}')" + echo "Fait." + done + fi return 0 elif [[ $1 == "utils" ]]; then echo "Compilation de src/mnist/utils.c"