From 727ca1371a5ba7d6da4b60db1a59b4f92ea68ddb Mon Sep 17 00:00:00 2001 From: Kirill Lokotkov Date: Wed, 14 Jan 2026 12:12:26 +0300 Subject: [PATCH] Fix error with Boost::headers when building with Thrift --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 7b8cef5fb5e..a2720b5c10d 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -1268,7 +1268,7 @@ if(ARROW_USE_BOOST) set(Boost_USE_STATIC_LIBS ON) endif() if(ARROW_BOOST_REQUIRE_LIBRARY) - set(ARROW_BOOST_COMPONENTS filesystem system) + set(ARROW_BOOST_COMPONENTS filesystem system headers) if(ARROW_FLIGHT_SQL_ODBC AND MSVC) list(APPEND ARROW_BOOST_COMPONENTS locale) endif() @@ -1817,6 +1817,8 @@ function(build_thrift) if(BOOST_VENDORED) target_link_libraries(thrift PUBLIC $) target_link_libraries(thrift PRIVATE $) + elseif (Boost_FOUND) + target_link_libraries(thrift PUBLIC $) endif() add_library(thrift::thrift INTERFACE IMPORTED)