Skip to content

Commit 0fbf982

Browse files
authored
GH-45628: [C++] Ensure specifying Boost include directory for bundled Thrift (#45637)
### Rationale for this change We must use the Boost for Apache Arrow C++ itself and bundled libraries including Apache Thrift. We can enforce it by specifying the target Boost explicitly instead of detecting Boost in each bundled libraries. ### What changes are included in this PR? Always specify `-DBoost_INCLUDE_DIR`. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: #45628 Authored-by: Sutou Kouhei <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
1 parent e2ac52d commit 0fbf982

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cpp/cmake_modules/ThirdpartyToolchain.cmake

+4-3
Original file line numberDiff line numberDiff line change
@@ -1773,9 +1773,10 @@ macro(build_thrift)
17731773
if(DEFINED BOOST_ROOT)
17741774
list(APPEND THRIFT_CMAKE_ARGS "-DBOOST_ROOT=${BOOST_ROOT}")
17751775
endif()
1776-
if(DEFINED Boost_INCLUDE_DIR)
1777-
list(APPEND THRIFT_CMAKE_ARGS "-DBoost_INCLUDE_DIR=${Boost_INCLUDE_DIR}")
1778-
endif()
1776+
list(APPEND
1777+
THRIFT_CMAKE_ARGS
1778+
"-DBoost_INCLUDE_DIR=$<TARGET_PROPERTY:Boost::headers,INTERFACE_INCLUDE_DIRECTORIES>"
1779+
)
17791780
if(DEFINED Boost_NAMESPACE)
17801781
list(APPEND THRIFT_CMAKE_ARGS "-DBoost_NAMESPACE=${Boost_NAMESPACE}")
17811782
endif()

0 commit comments

Comments
 (0)