You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ks...@apache.org on 2019/01/24 14:22:12 UTC

[arrow] branch master updated: ARROW-4360: [C++] Query homebrew for Thrift

This is an automated email from the ASF dual-hosted git repository.

kszucs 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 cf3d9eb  ARROW-4360: [C++] Query homebrew for Thrift
cf3d9eb is described below

commit cf3d9ebcc2a5228203aa63ac084fdc3e1faf46d6
Author: Korn, Uwe <Uw...@blue-yonder.com>
AuthorDate: Thu Jan 24 15:21:45 2019 +0100

    ARROW-4360: [C++] Query homebrew for Thrift
    
    Author: Korn, Uwe <Uw...@blue-yonder.com>
    
    Closes #3473 from xhochy/ARROW-4360 and squashes the following commits:
    
    11503a2b <Korn, Uwe> ARROW-4360:  Query homebrew for Thrift
---
 cpp/cmake_modules/FindThrift.cmake | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/cpp/cmake_modules/FindThrift.cmake b/cpp/cmake_modules/FindThrift.cmake
index 5402766..cb0f819 100644
--- a/cpp/cmake_modules/FindThrift.cmake
+++ b/cpp/cmake_modules/FindThrift.cmake
@@ -34,6 +34,17 @@ if( NOT "${THRIFT_HOME}" STREQUAL "")
     list( APPEND _thrift_roots ${_native_path} )
 elseif ( Thrift_HOME )
     list( APPEND _thrift_roots ${Thrift_HOME} )
+elseif (APPLE)
+  # Also look in homebrew for a matching llvm version
+  find_program(BREW_BIN brew)
+  if (BREW_BIN)
+    execute_process(
+      COMMAND ${BREW_BIN} --prefix "thrift"
+      OUTPUT_VARIABLE THRIFT_BREW_PREFIX
+      OUTPUT_STRIP_TRAILING_WHITESPACE
+    )
+    list( APPEND _thrift_roots ${THRIFT_BREW_PREFIX} )
+  endif()
 endif()
 
 message(STATUS "THRIFT_HOME: ${THRIFT_HOME}")