Skip to content

Commit 5be3e60

Browse files
committed
GH-47945: [C++] Require Boost 1.69 or later
Boost.System is header-only since Boost 1.69. CentOS 7 uses Boost 1.69. So we can drop support for Boost 1.68 or older.
1 parent 08b3cc9 commit 5be3e60

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

ci/conda_env_cpp.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ azure-storage-blobs-cpp>=12.10.0
2222
azure-storage-common-cpp>=12.5.0
2323
azure-storage-files-datalake-cpp>=12.9.0
2424
benchmark>=1.6.0,!=1.8.4
25-
boost-cpp>=1.68.0
2625
brotli
2726
bzip2
2827
c-ares
@@ -32,6 +31,7 @@ glog
3231
gmock>=1.10.0
3332
google-cloud-cpp>=1.34.0
3433
gtest>=1.10.0
34+
libboost-devel
3535
libgrpc
3636
libprotobuf
3737
libutf8proc

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,17 +1191,21 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION
11911191
# GH-34094 Older versions of Boost use the deprecated std::unary_function in
11921192
# boost/container_hash/hash.hpp and support for that was removed in clang 16
11931193
set(ARROW_BOOST_REQUIRED_VERSION "1.81")
1194-
elseif(ARROW_BUILD_TESTS)
1195-
set(ARROW_BOOST_REQUIRED_VERSION "1.64")
11961194
else()
1197-
set(ARROW_BOOST_REQUIRED_VERSION "1.58")
1195+
# CentOS 7 uses Boost 1.69.
1196+
set(ARROW_BOOST_REQUIRED_VERSION "1.69")
11981197
endif()
11991198

12001199
set(Boost_USE_MULTITHREADED ON)
12011200
if(MSVC AND ARROW_USE_STATIC_CRT)
12021201
set(Boost_USE_STATIC_RUNTIME ON)
12031202
endif()
12041203
# CMake 3.25.0 has 1.80 and older versions.
1204+
#
1205+
# We can remove this once we require CMake 3.30.0 or later because we
1206+
# enable CMP0167 "The FindBoost module is removed."
1207+
# https://cmake.org/cmake/help/latest/policy/CMP0167.html with CMake
1208+
# 3.30.0 or later.
12051209
set(Boost_ADDITIONAL_VERSIONS
12061210
"1.88.0"
12071211
"1.88"
@@ -1273,7 +1277,7 @@ if(ARROW_USE_BOOST)
12731277
set(Boost_USE_STATIC_LIBS ON)
12741278
endif()
12751279
if(ARROW_BOOST_REQUIRE_LIBRARY)
1276-
set(ARROW_BOOST_COMPONENTS filesystem system)
1280+
set(ARROW_BOOST_COMPONENTS filesystem)
12771281
if(ARROW_FLIGHT_SQL_ODBC AND MSVC)
12781282
list(APPEND ARROW_BOOST_COMPONENTS locale)
12791283
endif()
@@ -1327,9 +1331,6 @@ if(ARROW_USE_BOOST)
13271331
if(TARGET Boost::filesystem)
13281332
target_link_libraries(arrow::Boost::process INTERFACE Boost::filesystem)
13291333
endif()
1330-
if(TARGET Boost::system)
1331-
target_link_libraries(arrow::Boost::process INTERFACE Boost::system)
1332-
endif()
13331334
if(TARGET Boost::headers)
13341335
target_link_libraries(arrow::Boost::process INTERFACE Boost::headers)
13351336
endif()

cpp/src/arrow/filesystem/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,11 @@ if(ARROW_S3)
132132
DEFINITIONS
133133
ARROW_S3_LIBPATH="$<TARGET_FILE:arrow_s3fs>"
134134
EXTRA_LINK_LIBS
135-
Boost::filesystem
136-
Boost::system)
135+
Boost::filesystem)
137136
target_compile_definitions(arrow-filesystem-test
138137
PUBLIC ARROW_S3_LIBPATH="$<TARGET_FILE:arrow_s3fs>")
139138
target_sources(arrow-filesystem-test PUBLIC s3fs_module_test.cc s3_test_util.cc)
140-
target_link_libraries(arrow-filesystem-test PUBLIC Boost::filesystem Boost::system)
139+
target_link_libraries(arrow-filesystem-test PUBLIC Boost::filesystem)
141140
endif()
142141
endif()
143142

0 commit comments

Comments
 (0)