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

kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 1c83d6b3f3 GH-43167: [C++] Add workaround for missing Boost dependency 
of Thrift (#43328)
1c83d6b3f3 is described below

commit 1c83d6b3f316f45d9f804b47b0cb7771f2069144
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Aug 10 14:47:37 2024 +0900

    GH-43167: [C++] Add workaround for missing Boost dependency of Thrift 
(#43328)
    
    ### Rationale for this change
    
    Apache Thrift uses Boost but `thrift.pc` doesn't have 
`-I${BOOST_INCLUDE_DIR}`.
    
    ### What changes are included in this PR?
    
    Add Boost dependency in our side as a workaround.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    Yes.
    * GitHub Issue: #43167
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/cmake_modules/FindThriftAlt.cmake | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/cpp/cmake_modules/FindThriftAlt.cmake 
b/cpp/cmake_modules/FindThriftAlt.cmake
index f3e49021d5..98a706deb9 100644
--- a/cpp/cmake_modules/FindThriftAlt.cmake
+++ b/cpp/cmake_modules/FindThriftAlt.cmake
@@ -191,6 +191,10 @@ if(ThriftAlt_FOUND)
     # thrift/windows/config.h for Visual C++.
     set_target_properties(thrift::thrift PROPERTIES INTERFACE_LINK_LIBRARIES 
"ws2_32")
   endif()
+  # Workaround: thrift.pc doesn't have Boost dependency.
+  if(TARGET Boost::headers)
+    target_link_libraries(thrift::thrift INTERFACE Boost::headers)
+  endif()
 
   if(Thrift_COMPILER_FOUND)
     add_executable(thrift::compiler IMPORTED)

Reply via email to