fix grep in CUDA version detection to accomodate OSX's grep (and other grep that...
authorSheng Zha <szha@umd.edu>
Sat, 30 Apr 2016 23:40:05 +0000 (16:40 -0700)
committerSheng Zha <szha@umd.edu>
Sat, 30 Apr 2016 23:40:05 +0000 (16:40 -0700)
Makefile

index 5424c3a..568d9c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -272,7 +272,7 @@ endif
 ifeq ($(OSX), 1)
        CXX := /usr/bin/clang++
        ifneq ($(CPU_ONLY), 1)
-               CUDA_VERSION := $(shell $(CUDA_DIR)/bin/nvcc -V | grep -o 'release \d' | grep -o '\d')
+               CUDA_VERSION := $(shell $(CUDA_DIR)/bin/nvcc -V | grep -o 'release [0-9.]*' | grep -o '[0-9.]*')
                ifeq ($(shell echo | awk '{exit $(CUDA_VERSION) < 7.0;}'), 1)
                        CXXFLAGS += -stdlib=libstdc++
                        LINKFLAGS += -stdlib=libstdc++