Merge pull request #2224 from small-yellow-duck/master

[build] check if CPU_ONLY is set when determining CUDA version
This commit is contained in:
Evan Shelhamer 2015-03-31 11:14:30 -07:00
Родитель d39a3ebe4d fe50c502db
Коммит 2a7fe03b5d
1 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@ -232,6 +232,7 @@ endif
# libstdc++ for NVCC compatibility on OS X >= 10.9 with CUDA < 7.0
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')
ifeq ($(shell echo $(CUDA_VERSION) \< 7.0 | bc), 1)
CXXFLAGS += -stdlib=libstdc++
@ -239,6 +240,7 @@ ifeq ($(OSX), 1)
endif
# clang throws this warning for cuda headers
WARNINGS += -Wno-unneeded-internal-declaration
endif
# gtest needs to use its own tuple to not conflict with clang
COMMON_FLAGS += -DGTEST_USE_OWN_TR1_TUPLE=1
# boost::thread is called boost_thread-mt to mark multithreading on OS X