mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +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 () {
|
compile_cuda () {
|
||||||
# nvcc will compile .c files as if they did not have
|
# nvcc will compile .c files as if they did not have
|
||||||
# CUDA program parts so we need to copy them to .cu
|
# 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}
|
nvcc "$1"u ${*:1}
|
||||||
rm "$1"u
|
mv "$1"u "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
build () {
|
build () {
|
||||||
@ -152,7 +153,7 @@ usage () {
|
|||||||
|
|
||||||
[[ $CC ]] || CC=gcc
|
[[ $CC ]] || CC=gcc
|
||||||
if [[ "$CC" == "gcc" ]]; then
|
if [[ "$CC" == "gcc" ]]; then
|
||||||
FLAGS="-std=c99 -lm -lpthread" # GCC flags
|
FLAGS="-std=c99 -lm -lpthread -Wall -Wextra" # GCC flags
|
||||||
elif [[ "$CC" == "nvcc" ]]; then
|
elif [[ "$CC" == "nvcc" ]]; then
|
||||||
CC=compile_cuda
|
CC=compile_cuda
|
||||||
FLAGS="" # NVCC flags
|
FLAGS="" # NVCC flags
|
||||||
|
Loading…
Reference in New Issue
Block a user