Skip to content

Commit

Permalink
Add BOOST_PROCESS_HAVE_V1
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 29, 2024
1 parent fc1400d commit e34715b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@ if(ARROW_USE_BOOST)

if(TARGET Boost::process)
# Boost >= 1.86
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V1")
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V2")
else()
# Boost < 1.86
Expand Down
8 changes: 3 additions & 5 deletions cpp/src/arrow/testing/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
//
// [1] https://github.com/boostorg/process/issues/259
// [2] https://github.com/googleapis/storage-testbench/issues/669
#ifdef _WIN32
#define BOOST_PROCESS_FORCE_V1
#else
#ifndef _WIN32
#define BOOST_PROCESS_USE_V2
#endif
#endif
Expand Down Expand Up @@ -63,7 +61,7 @@
#ifdef __MINGW32__
#define BOOST_USE_WINDOWS_H = 1
#endif
#ifdef BOOST_PROCESS_FORCE_V1
#ifdef BOOST_PROCESS_HAVE_V1
#include <boost/process/v1.hpp>
#else
#include <boost/process.hpp>
Expand All @@ -85,7 +83,7 @@ namespace asio = BOOST_PROCESS_V2_ASIO_NAMESPACE;
namespace process = BOOST_PROCESS_V2_NAMESPACE;
namespace filesystem = process::filesystem;
#else
#ifdef BOOST_PROCESS_FORCE_V1
#ifdef BOOST_PROCESS_HAVE_V1
namespace process = boost::process::v1;
namespace filesystem = boost::process::v1::filesystem;
#else
Expand Down

0 comments on commit e34715b

Please sign in to comment.