notes-ing2/gpu/tp2/c/build.sh
2024-03-28 17:58:33 +01:00

25 lines
346 B
Bash
Executable file

#!/bin/sh
cd "$(dirname "$(realpath "$0")")"
set -e
alias log="echo '[build.sh]'"
TARGET="ex1 ex2 ex3"
if [ $# -gt 0 ]
then targets=$@
fi
rm -fr bin
mkdir -p bin
ccargs=""
#ccargs="$ccargs -g -G -Xcompiler -fsanitize=address"
for target in $targets
do
echo ""
nvcc $ccargs -o bin/${target}.out src/${target}.cu
./bin/${target}.out
done