Skip to content

Commit

Permalink
Boost::XXX may not exist when boost-cmake isn't used
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 29, 2024
1 parent e34715b commit 66326b9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1330,8 +1330,15 @@ if(ARROW_USE_BOOST)
else()
# Boost < 1.86
add_library(Boost::process INTERFACE IMPORTED)
target_link_libraries(Boost::process INTERFACE Boost::filesystem Boost::system
Boost::headers)
if(TARGET Boost::filesystem)
target_link_libraries(Boost::process INTERFACE Boost::filesystem)
endif()
if(TARGET Boost::system)
target_link_libraries(Boost::process INTERFACE Boost::system)
endif()
if(TARGET Boost::headers)
target_link_libraries(Boost::process INTERFACE Boost::headers)
endif()
if(Boost_VERSION VERSION_GREATER_EQUAL 1.80)
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V2")
# Boost < 1.86 has a bug that
Expand Down

0 comments on commit 66326b9

Please sign in to comment.