Check for nvcc before building CUDA version
This commit is contained in:
parent
ad93754c3b
commit
bb0dcce28b
4
Makefile
4
Makefile
@ -13,7 +13,11 @@ gpu-stream-ocl: ocl-stream.cpp
|
|||||||
c++ $< $(FLAGS) -o $@ $(LIBS)
|
c++ $< $(FLAGS) -o $@ $(LIBS)
|
||||||
|
|
||||||
gpu-stream-cuda: cuda-stream.cu
|
gpu-stream-cuda: cuda-stream.cu
|
||||||
|
ifeq ($(shell which nvcc > /dev/null; echo $$?), 0)
|
||||||
nvcc $< $(FLAGS) -o $@
|
nvcc $< $(FLAGS) -o $@
|
||||||
|
else
|
||||||
|
@echo "Cannot find nvcc, please install CUDA";
|
||||||
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f gpu-stream-ocl gpu-stream-cuda
|
rm -f gpu-stream-ocl gpu-stream-cuda
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user