Skip to content

Commit

Permalink
ARROW-7838: [C++] Only link Boost libraries with tests, not libarrow.so
Browse files Browse the repository at this point in the history
Enabling S3 or Flight tests would add a spurious link dependency between
libarrow (and therefore plasma-store-server) and Boost.

Closes #6438 from pitrou/ARROW-7838-boost-linking-plasma and squashes the following commits:

fb9c3ad <Antoine Pitrou> ARROW-7838:  Only link Boost libraries with tests, not libarrow.so

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
pitrou authored and kou committed Feb 18, 2020
1 parent c92cbfd commit cc2f65f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
9 changes: 1 addition & 8 deletions cpp/CMakeLists.txt
Expand Up @@ -693,14 +693,7 @@ set(ARROW_SHARED_PRIVATE_LINK_LIBS ${ARROW_STATIC_LINK_LIBS})

# boost::filesystem is needed for S3 and Flight tests as a boost::process dependency.
if(((ARROW_FLIGHT OR ARROW_S3) AND (ARROW_BUILD_TESTS OR ARROW_BUILD_INTEGRATION)))
set(ARROW_WITH_BOOST_FILESYSTEM ON)

list(APPEND ARROW_SHARED_PRIVATE_LINK_LIBS ${BOOST_FILESYSTEM_LIBRARY}
${BOOST_SYSTEM_LIBRARY})

list(APPEND ARROW_STATIC_LINK_LIBS ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SYSTEM_LIBRARY})

list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS boost_filesystem boost_system)
list(APPEND ARROW_TEST_LINK_LIBS ${BOOST_FILESYSTEM_LIBRARY} ${BOOST_SYSTEM_LIBRARY})
endif()

if(NOT MSVC)
Expand Down
4 changes: 0 additions & 4 deletions cpp/src/arrow/CMakeLists.txt
Expand Up @@ -199,10 +199,6 @@ set(ARROW_SRCS
# Disable DLL exports in vendored uriparser library
add_definitions(-DURI_STATIC_BUILD)

if(ARROW_WITH_BOOST_FILESYSTEM)
add_definitions(-DARROW_WITH_BOOST_FILESYSTEM)
endif()

if(ARROW_WITH_BROTLI)
add_definitions(-DARROW_WITH_BROTLI)
list(APPEND ARROW_SRCS util/compression_brotli.cc)
Expand Down

0 comments on commit cc2f65f

Please sign in to comment.