Check for nvcc before building CUDA version

This commit is contained in:
Tom Deakin 2015-07-27 17:40:24 +01:00
parent ad93754c3b
commit bb0dcce28b

View File

@ -13,7 +13,11 @@ gpu-stream-ocl: ocl-stream.cpp
c++ $< $(FLAGS) -o $@ $(LIBS)
gpu-stream-cuda: cuda-stream.cu
ifeq ($(shell which nvcc > /dev/null; echo $$?), 0)
nvcc $< $(FLAGS) -o $@
else
@echo "Cannot find nvcc, please install CUDA";
endif
clean:
rm -f gpu-stream-ocl gpu-stream-cuda