mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Fix nvcc compilation errors
This commit is contained in:
parent
c39e9bab4f
commit
bae59ceef0
7
make.sh
7
make.sh
@ -7,9 +7,10 @@ set -e
|
||||
compile_cuda () {
|
||||
# nvcc will compile .c files as if they did not have
|
||||
# CUDA program parts so we need to copy them to .cu
|
||||
cp $1 "$1"u
|
||||
mv $1 "$1"u
|
||||
echo "" > "$1" # If we compile file.cu, file.c needs to exist to, even if it is empty
|
||||
nvcc "$1"u ${*:1}
|
||||
rm "$1"u
|
||||
mv "$1"u "$1"
|
||||
}
|
||||
|
||||
build () {
|
||||
@ -152,7 +153,7 @@ usage () {
|
||||
|
||||
[[ $CC ]] || CC=gcc
|
||||
if [[ "$CC" == "gcc" ]]; then
|
||||
FLAGS="-std=c99 -lm -lpthread" # GCC flags
|
||||
FLAGS="-std=c99 -lm -lpthread -Wall -Wextra" # GCC flags
|
||||
elif [[ "$CC" == "nvcc" ]]; then
|
||||
CC=compile_cuda
|
||||
FLAGS="" # NVCC flags
|
||||
|
Loading…
Reference in New Issue
Block a user