summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2015-09-21 18:06:03 (GMT)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2015-09-21 18:06:03 (GMT)
commit58e4ea4e232fdc713609d442c9f46e57e364f460 (patch)
tree67d7f0e71b6026039b99d7a89db549405c86d5c0
parent9dca961545caf3c0d4321fc580d352f5052af6fb (diff)
parentda75a0e715f3d434c6b4c23d55947e114b332337 (diff)
downloadcaffeonacl-58e4ea4e232fdc713609d442c9f46e57e364f460.zip
caffeonacl-58e4ea4e232fdc713609d442c9f46e57e364f460.tar.gz
caffeonacl-58e4ea4e232fdc713609d442c9f46e57e364f460.tar.bz2
Merge pull request #3093 from shelhamer/check-xcode-clt-version
[build] check xcode command line tools version >= 6
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a911133..5fb6394 100644
--- a/Makefile
+++ b/Makefile
@@ -354,8 +354,9 @@ else
# OS X packages atlas as the vecLib framework
LIBRARIES += cblas
# 10.10 has accelerate while 10.9 has veclib
- XCODE_CLT_VER := $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep -o 'version: 6')
- ifneq (,$(findstring version: 6,$(XCODE_CLT_VER)))
+ XCODE_CLT_VER := $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep 'version' | sed 's/[^0-9]*\([0-9]\).*/\1/')
+ XCODE_CLT_GEQ_6 := $(shell [ $(XCODE_CLT_VER) -gt 5 ] && echo 1)
+ ifeq ($(XCODE_CLT_GEQ_6), 1)
BLAS_INCLUDE ?= /System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
LDFLAGS += -framework Accelerate
else