From bb0dcce28b74102b3e5ada2eb28f5a302d9a079e Mon Sep 17 00:00:00 2001 From: Tom Deakin Date: Mon, 27 Jul 2015 17:40:24 +0100 Subject: [PATCH] Check for nvcc before building CUDA version --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index a2ad125..854c4e2 100644 --- a/Makefile +++ b/Makefile @@ -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