summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2015-09-20 03:38:18 (GMT)
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2015-09-20 03:40:26 (GMT)
commitda75a0e715f3d434c6b4c23d55947e114b332337 (patch)
tree032f571e7941acb24e5e91dccb0cc5a3a8b4a159
parent68655b55925cfa5cd6543cdfb879bf6e68bd2a3c (diff)
downloadcaffeonacl-da75a0e715f3d434c6b4c23d55947e114b332337.zip
caffeonacl-da75a0e715f3d434c6b4c23d55947e114b332337.tar.gz
caffeonacl-da75a0e715f3d434c6b4c23d55947e114b332337.tar.bz2
[build] check xcode command line tools version >= 6
future-proof version check for BLAS libraries on OS X fix #3092
-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