From 8db82602fde620f495751bc91176783cfb90d978 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Mon, 27 Jun 2022 11:06:48 +0200 Subject: [PATCH] Fix make.sh --- make.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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"