Skip to content

Commit da75a0e

Browse files
committed
[build] check xcode command line tools version >= 6
future-proof version check for BLAS libraries on OS X fix BVLC#3092
1 parent 68655b5 commit da75a0e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,9 @@ else
354354
# OS X packages atlas as the vecLib framework
355355
LIBRARIES += cblas
356356
# 10.10 has accelerate while 10.9 has veclib
357-
XCODE_CLT_VER := $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep -o 'version: 6')
358-
ifneq (,$(findstring version: 6,$(XCODE_CLT_VER)))
357+
XCODE_CLT_VER := $(shell pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep 'version' | sed 's/[^0-9]*\([0-9]\).*/\1/')
358+
XCODE_CLT_GEQ_6 := $(shell [ $(XCODE_CLT_VER) -gt 5 ] && echo 1)
359+
ifeq ($(XCODE_CLT_GEQ_6), 1)
359360
BLAS_INCLUDE ?= /System/Library/Frameworks/Accelerate.framework/Versions/Current/Frameworks/vecLib.framework/Headers/
360361
LDFLAGS += -framework Accelerate
361362
else

0 commit comments

Comments
 (0)