diff --git a/CMakeLists.txt b/CMakeLists.txt index 01c1bc21c..7be6fdbc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,12 @@ target_compile_definitions(boost_process PRIVATE BOOST_PROCESS_SOURCE=1 ) +if (BOOST_PROCESS_USE_STD_FS) + target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_USE_STD_FS=1 ) +else() + target_link_libraries(boost_process PUBLIC Boost::filesystem) +endif() + if(BUILD_SHARED_LIBS) target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_DYN_LINK) else() @@ -57,8 +63,6 @@ else() endif() if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt") - add_subdirectory(test) - endif() diff --git a/build/Jamfile b/build/Jamfile index fe98df690..1a1c34511 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -17,6 +17,9 @@ project : requirements : source-location ../src ; +feature.feature boost.process.fs : boost std : propagated composite ; +feature.compose std : BOOST_PROCESS_USE_STD_FS=1 ; + alias process_sources : detail/environment_posix.cpp detail/environment_win.cpp @@ -41,9 +44,10 @@ lib boost_process : process_sources : requirements BOOST_PROCESS_SOURCE=1 shared:BOOST_PROCESS_DYN_LINK=1 + boost:/boost//filesystem : usage-requirements shared:BOOST_PROCESS_DYN_LINK=1 - + boost:/boost//filesystem ; boost-install boost_process ; \ No newline at end of file