Fix make.sh

This commit is contained in:
augustin64 2022-06-27 11:06:48 +02:00
parent 886e61384a
commit 8db82602fd

14
make.sh
View File

@ -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"