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 deccce1504 GH-45423: [C++] Don't require Boost library with
ARROW_TESTING=ON/ARROW_BUILD_SHARED=OFF (#45424)
deccce1504 is described below
commit deccce15041809157a84ff2b869015a36bdf2270
Author: Sutou Kouhei <[email protected]>
AuthorDate: Thu Feb 6 16:43:50 2025 +0900
GH-45423: [C++] Don't require Boost library with
ARROW_TESTING=ON/ARROW_BUILD_SHARED=OFF (#45424)
### Rationale for this change
We can use `libarrow_testing.a` without `boost::filesystem` when
`arrow::util::Process` isn't used.
### What changes are included in this PR?
`ARROW_TESTING=ON` requires Boost. If `ARROW_BUILD_SHARED=ON` is also used,
Boost libraries are also required.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #45423
Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
cpp/cmake_modules/ThirdpartyToolchain.cmake | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index e08e1cb2c6..3f169900b1 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1256,14 +1256,19 @@ endif()
# - Gandiva has a compile-time (header-only) dependency on Boost, not runtime.
# - Tests need Boost at runtime.
# - S3FS and Flight benchmarks need Boost at runtime.
+# - arrow_testing uses boost::filesystem. So arrow_testing requires
+# Boost library. (boost::filesystem isn't header-only.) But if we
+# use arrow_testing as a static library without
+# using arrow::util::Process, we don't need boost::filesystem.
if(ARROW_BUILD_INTEGRATION
OR ARROW_BUILD_TESTS
- OR ARROW_FUZZING
OR (ARROW_FLIGHT AND (ARROW_TESTING OR ARROW_BUILD_BENCHMARKS))
- OR (ARROW_S3 AND ARROW_BUILD_BENCHMARKS))
+ OR (ARROW_S3 AND ARROW_BUILD_BENCHMARKS)
+ OR (ARROW_TESTING AND ARROW_BUILD_SHARED))
set(ARROW_USE_BOOST TRUE)
set(ARROW_BOOST_REQUIRE_LIBRARY TRUE)
elseif(ARROW_GANDIVA
+ OR ARROW_TESTING
OR ARROW_WITH_THRIFT
OR (NOT ARROW_USE_NATIVE_INT128))
set(ARROW_USE_BOOST TRUE)