This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 9c332e7 ARROW-4290: [C++/Gandiva] Support detecting correct LLVM
version in Homebrew
9c332e7 is described below
commit 9c332e7b079187872e25d3f656a0eb32b559d283
Author: Korn, Uwe <[email protected]>
AuthorDate: Mon Jan 21 08:05:31 2019 +0900
ARROW-4290: [C++/Gandiva] Support detecting correct LLVM version in Homebrew
Author: Korn, Uwe <[email protected]>
Author: Uwe L. Korn <[email protected]>
Closes #3429 from xhochy/ARROW-4290 and squashes the following commits:
4617b2f8 <Uwe L. Korn> Simplify check for brew
1746e928 <Korn, Uwe> ARROW-4290: Support detecting correct LLVM version in
Homebrew
---
cpp/cmake_modules/FindLLVM.cmake | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/cpp/cmake_modules/FindLLVM.cmake b/cpp/cmake_modules/FindLLVM.cmake
index 4094162..edc1b48 100644
--- a/cpp/cmake_modules/FindLLVM.cmake
+++ b/cpp/cmake_modules/FindLLVM.cmake
@@ -21,9 +21,23 @@
#
set(GANDIVA_LLVM_VERSION 6.0)
+
+if (APPLE)
+ # Also look in homebrew for a matching llvm version
+ find_program(BREW_BIN brew)
+ if (BREW_BIN)
+ execute_process(
+ COMMAND ${BREW_BIN} --prefix "llvm@6"
+ OUTPUT_VARIABLE LLVM_BREW_PREFIX
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ endif()
+endif()
+
find_package(LLVM ${GANDIVA_LLVM_VERSION} REQUIRED CONFIG HINTS
/usr/local/opt/llvm
/usr/share
+ ${LLVM_BREW_PREFIX}
${LLVM_DIR})
message(STATUS "Found LLVM ${LLVM_PACKAGE_VERSION}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")