Skip to content

Commit

Permalink
added Boost::filesystem dependency to build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Jul 3, 2024
1 parent c2da58e commit c342762
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,19 @@ 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()
target_compile_definitions(boost_process PUBLIC BOOST_PROCESS_STATIC_LINK)
endif()

if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")

add_subdirectory(test)

endif()

6 changes: 5 additions & 1 deletion build/Jamfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ project : requirements
: source-location ../src
;

feature.feature boost.process.fs : boost std : propagated composite ;
feature.compose <boost.process.fs>std : <define>BOOST_PROCESS_USE_STD_FS=1 ;

alias process_sources
: detail/environment_posix.cpp
detail/environment_win.cpp
Expand All @@ -41,9 +44,10 @@ lib boost_process
: process_sources
: requirements <define>BOOST_PROCESS_SOURCE=1
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1
<boost.process.fs>boost:<library>/boost//filesystem
: usage-requirements
<link>shared:<define>BOOST_PROCESS_DYN_LINK=1

<boost.process.fs>boost:<library>/boost//filesystem
;

boost-install boost_process ;

0 comments on commit c342762

Please sign in to comment.