25 lines
346 B
Bash
Executable file
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
|