From 8e3afd243c22e7f46c802b139b40e37c213bd484 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 01/12] Make the library modular usable. --- build.jam | 42 +++++++++++++++ example/Jamfile.jam | 1 - example/v2/Jamfile.jam | 8 ++- test/Jamfile.jam | 119 +++++++++++++++++++++-------------------- test/v2/Jamfile.jam | 5 +- 5 files changed, 107 insertions(+), 68 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..29faa2d52 --- /dev/null +++ b/build.jam @@ -0,0 +1,42 @@ +# Copyright René Ferdinand Rivera Morell 2024 +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import feature : feature ; + +feature boost.process.fs : boost std : optional propagated ; + +project /boost/process + : common-requirements + std:BOOST_PROCESS_USE_STD_FS=1 + boost:/boost/filesystem//boost_filesystem + /boost/algorithm//boost_algorithm + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/move//boost_move + /boost/optional//boost_optional + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/tokenizer//boost_tokenizer + /boost/type_index//boost_type_index + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + /boost/winapi//boost_winapi + include + : default-build + boost + ; + +explicit + [ alias boost_process ] + [ alias all : boost_process example example/v2 test test//v2 ] + ; + +call-if : boost-library process + ; diff --git a/example/Jamfile.jam b/example/Jamfile.jam index 4a9aa06f8..d12ec4ef7 100644 --- a/example/Jamfile.jam +++ b/example/Jamfile.jam @@ -8,7 +8,6 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) project : requirements - ../../.. msvc:_SCL_SECURE_NO_WARNINGS windows:WIN32_LEAN_AND_MEAN ; diff --git a/example/v2/Jamfile.jam b/example/v2/Jamfile.jam index 26da639a2..450fdc21d 100644 --- a/example/v2/Jamfile.jam +++ b/example/v2/Jamfile.jam @@ -4,14 +4,12 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) project : requirements - ../../.. msvc:_SCL_SECURE_NO_WARNINGS windows:WIN32_LEAN_AND_MEAN + static ; import testing ; -alias filesystem : /boost//filesystem : static ; - -exe intro : intro.cpp filesystem ; -exe intro_popen : intro_popen.cpp filesystem ; +exe intro : intro.cpp ; +exe intro_popen : intro_popen.cpp : boost ; diff --git a/test/Jamfile.jam b/test/Jamfile.jam index dd8755147..1c0c38452 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -28,6 +28,8 @@ project : requirements linux:-lpthread NT,cw:ws2_32 NT,gcc:ws2_32 + /boost/test//boost_test + static ; @@ -35,24 +37,23 @@ project : requirements import testing ; -alias program_options : /boost//program_options : static ; -alias filesystem : /boost//filesystem ; -alias iostreams : /boost//iostreams ; -alias system : /boost//system ; -alias thread : /boost//thread ; -alias coroutine : /boost//coroutine : static ; +alias program_options : /boost/program_options//boost_program_options ; +alias iostreams : /boost/iostreams//boost_iostreams ; +alias thread : /boost/thread//boost_thread ; +alias coroutine : /boost/coroutine//boost_coroutine ; -lib multi_ref : multi_ref1.cpp multi_ref2.cpp system : windows:shell32 ; +lib multi_ref : multi_ref1.cpp multi_ref2.cpp : windows:shell32 ; -exe sparring_partner : sparring_partner.cpp program_options system filesystem iostreams : +exe sparring_partner : sparring_partner.cpp program_options iostreams : off windows:shell32 windows:Ntdll + /boost/lambda//boost_lambda ; exe exit_argc : exit_argc.cpp : off windows:shell32 ; -exe sub_launch : sub_launcher.cpp program_options iostreams system filesystem : off windows:shell32 ; +exe sub_launch : sub_launcher.cpp program_options iostreams : off windows:shell32 ; rule test-options ( name ) { @@ -69,9 +70,9 @@ rule test-options ( name ) test-suite bare : - [ run environment.cpp system filesystem : [ test-options environment ] ] - [ run async_pipe.cpp system filesystem : [ test-options async_pipe ] : : darwin:no ] - [ run pipe.cpp system filesystem : [ test-options pipe ] ] + [ run environment.cpp : [ test-options environment ] ] + [ run async_pipe.cpp : [ test-options async_pipe ] : : darwin:no ] + [ run pipe.cpp : [ test-options pipe ] ] [ compile no_ansi_apps.cpp ] [ compile-fail spawn_fail.cpp ] [ compile-fail async_system_fail.cpp ] @@ -79,56 +80,56 @@ test-suite bare : ; test-suite with-valgrind : - [ run async.cpp system thread filesystem : [ test-options async ] : sparring_partner ] - [ run async_fut.cpp system thread filesystem : [ test-options async_fut ] : sparring_partner ] - [ run args_handling.cpp system thread filesystem : [ test-options args_handling ] : exit_argc ] - [ run args_cmd.cpp system filesystem : [ test-options args_cmd ] : sparring_partner ] - [ run wargs_cmd.cpp system filesystem : [ test-options wargs_cmd ] : sparring_partner ] - [ run bind_stderr.cpp filesystem : [ test-options bind_stderr ] : sparring_partner ] - [ run bind_stdin.cpp system filesystem : [ test-options bind_stdin ] : sparring_partner ] - [ run bind_stdin_stdout.cpp system filesystem : [ test-options bind_stdin_stdout ] : sparring_partner ] - [ run bind_stdout.cpp system filesystem : [ test-options bind_stdout ] : sparring_partner ] - [ run bind_stdout_stderr.cpp system filesystem : [ test-options bind_stdout_stderr ] : sparring_partner ] - [ run pipe_fwd.cpp system filesystem : [ test-options pipe_fwd ] : sparring_partner ] - [ run cmd_test.cpp system filesystem : [ test-options cmd_test ] : sparring_partner ] - [ run close_stderr.cpp system filesystem : [ test-options close_stderr ] : sparring_partner ] - [ run close_stdin.cpp system filesystem : [ test-options close_stdin ] : sparring_partner ] - [ run close_stdout.cpp system filesystem : [ test-options close_stdout ] : sparring_partner ] - [ run error.cpp system filesystem : [ test-options error ] : sparring_partner ] - [ run exit_code.cpp program_options system filesystem : [ test-options exit_code ] : sparring_partner ] - [ run extensions.cpp system filesystem : [ test-options extensions ] : sparring_partner ] - [ run env.cpp program_options system filesystem : [ test-options env ] : sparring_partner ] - [ run group.cpp system thread filesystem : [ test-options group ] : sub_launch ] - [ run group.cpp system thread filesystem : [ test-options group ] : sub_launch : no windows:yes BOOST_USE_WINDOWS_H=1 : group-windows-h ] - [ run group_wait.cpp system thread filesystem : [ test-options group_wait ] : sparring_partner : darwin:no freebsd:no ] - [ run limit_fd.cpp program_options system filesystem : [ test-options limit_fd ] : sparring_partner : freebsd:no ] - [ run run_exe.cpp filesystem : : sparring_partner ] - [ run run_exe_path.cpp filesystem : [ test-options run_exe_path ] : sparring_partner ] - [ run search_path.cpp filesystem system : [ test-options search_path ] : : windows:shell32 ] - [ run shell.cpp filesystem system : [ test-options shell ] : sparring_partner : darwin:no ] - [ run shell_path.cpp filesystem system : [ test-options shell_path ] ] - [ run system_test1.cpp filesystem system : [ test-options system_test1 ] : sparring_partner ] - [ run system_test2.cpp filesystem system : [ test-options system_test2 ] : sparring_partner ] - [ run spawn.cpp filesystem system : [ test-options spawn ] : sparring_partner ] - [ run start_dir.cpp filesystem system : [ test-options start_dir ] : sparring_partner ] - [ run terminate.cpp system filesystem : [ test-options terminate ] : sparring_partner : freebsd:no ] - [ run throw_on_error.cpp system filesystem : [ test-options throw_on_error ] : sparring_partner ] - [ run wait.cpp system filesystem : [ test-options wait ] : sparring_partner ] - [ run wait_for.cpp system filesystem : [ test-options wait_for ] : sparring_partner ] - [ run on_exit.cpp system filesystem : [ test-options on_exit ] : sparring_partner ] - [ run on_exit2.cpp system filesystem : [ test-options on_exit2 ] : sparring_partner ] - [ run on_exit3.cpp system filesystem : [ test-options on_exit3 ] : sparring_partner ] - [ run posix_specific.cpp system filesystem : [ test-options posix_specific ] : sparring_partner : no linux:yes ] - [ run windows_specific.cpp filesystem system : [ test-options windows_specific ] : sparring_partner : no windows:yes ] + [ run async.cpp thread : [ test-options async ] : sparring_partner ] + [ run async_fut.cpp thread : [ test-options async_fut ] : sparring_partner ] + [ run args_handling.cpp thread : [ test-options args_handling ] : exit_argc ] + [ run args_cmd.cpp : [ test-options args_cmd ] : sparring_partner ] + [ run wargs_cmd.cpp : [ test-options wargs_cmd ] : sparring_partner ] + [ run bind_stderr.cpp : [ test-options bind_stderr ] : sparring_partner : boost ] + [ run bind_stdin.cpp : [ test-options bind_stdin ] : sparring_partner : boost ] + [ run bind_stdin_stdout.cpp : [ test-options bind_stdin_stdout ] : sparring_partner : boost ] + [ run bind_stdout.cpp : [ test-options bind_stdout ] : sparring_partner : boost ] + [ run bind_stdout_stderr.cpp : [ test-options bind_stdout_stderr ] : sparring_partner : boost ] + [ run pipe_fwd.cpp : [ test-options pipe_fwd ] : sparring_partner ] + [ run cmd_test.cpp : [ test-options cmd_test ] : sparring_partner : boost ] + [ run close_stderr.cpp : [ test-options close_stderr ] : sparring_partner ] + [ run close_stdin.cpp : [ test-options close_stdin ] : sparring_partner ] + [ run close_stdout.cpp : [ test-options close_stdout ] : sparring_partner ] + [ run error.cpp : [ test-options error ] : sparring_partner ] + [ run exit_code.cpp program_options : [ test-options exit_code ] : sparring_partner ] + [ run extensions.cpp : [ test-options extensions ] : sparring_partner ] + [ run env.cpp program_options : [ test-options env ] : sparring_partner ] + [ run group.cpp thread : [ test-options group ] : sub_launch ] + [ run group.cpp thread : [ test-options group ] : sub_launch : no windows:yes BOOST_USE_WINDOWS_H=1 : group-windows-h ] + [ run group_wait.cpp thread : [ test-options group_wait ] : sparring_partner : darwin:no freebsd:no /boost/scope_exit//boost_scope_exit ] + [ run limit_fd.cpp program_options : [ test-options limit_fd ] : sparring_partner : freebsd:no ] + [ run run_exe.cpp : : sparring_partner ] + [ run run_exe_path.cpp : [ test-options run_exe_path ] : sparring_partner ] + [ run search_path.cpp : [ test-options search_path ] : : windows:shell32 ] + [ run shell.cpp : [ test-options shell ] : sparring_partner : darwin:no ] + [ run shell_path.cpp : [ test-options shell_path ] ] + [ run system_test1.cpp : [ test-options system_test1 ] : sparring_partner ] + [ run system_test2.cpp : [ test-options system_test2 ] : sparring_partner ] + [ run spawn.cpp : [ test-options spawn ] : sparring_partner ] + [ run start_dir.cpp : [ test-options start_dir ] : sparring_partner ] + [ run terminate.cpp : [ test-options terminate ] : sparring_partner : freebsd:no ] + [ run throw_on_error.cpp : [ test-options throw_on_error ] : sparring_partner ] + [ run wait.cpp : [ test-options wait ] : sparring_partner ] + [ run wait_for.cpp : [ test-options wait_for ] : sparring_partner ] + [ run on_exit.cpp : [ test-options on_exit ] : sparring_partner ] + [ run on_exit2.cpp : [ test-options on_exit2 ] : sparring_partner ] + [ run on_exit3.cpp : [ test-options on_exit3 ] : sparring_partner ] + [ run posix_specific.cpp : [ test-options posix_specific ] : sparring_partner : no linux:yes ] + [ run windows_specific.cpp : [ test-options windows_specific ] : sparring_partner : no windows:yes ] : bare ; test-suite without-valgrind : - [ run async_system_future.cpp filesystem system coroutine : [ test-options async_system_future ] : sparring_partner : static msvc:/bigobj ] - [ run async_system_stackful.cpp filesystem system coroutine : [ test-options async_system_stackful ] : sparring_partner : static msvc:/bigobj ] -# [ run async_system_stackful_error.cpp filesystem system coroutine : [ test-options async_system_stackful_error ] : sparring_partner : static msvc:/bigobj ] - [ run async_system_stackful_except.cpp filesystem system coroutine : [ test-options async_system_stackful_except ] : sparring_partner : static msvc:/bigobj ] - [ run async_system_stackless.cpp filesystem system coroutine : [ test-options async_system_stackless ] : sparring_partner : static msvc:/bigobj ] - [ run vfork.cpp system filesystem : [ test-options vfork ] : sparring_partner : no linux:yes ] + [ run async_system_future.cpp coroutine : [ test-options async_system_future ] : sparring_partner : static msvc:/bigobj ] + [ run async_system_stackful.cpp coroutine : [ test-options async_system_stackful ] : sparring_partner : static msvc:/bigobj ] +# [ run async_system_stackful_error.cpp coroutine : [ test-options async_system_stackful_error ] : sparring_partner : static msvc:/bigobj ] + [ run async_system_stackful_except.cpp coroutine : [ test-options async_system_stackful_except ] : sparring_partner : static msvc:/bigobj ] + [ run async_system_stackless.cpp coroutine : [ test-options async_system_stackless ] : sparring_partner : static msvc:/bigobj ] + [ run vfork.cpp : [ test-options vfork ] : sparring_partner : no linux:yes ] ; diff --git a/test/v2/Jamfile.jam b/test/v2/Jamfile.jam index cc4c41b6b..5fff94913 100644 --- a/test/v2/Jamfile.jam +++ b/test/v2/Jamfile.jam @@ -32,12 +32,11 @@ project : requirements NT,gcc:ws2_32 NT,gcc:Bcrypt BOOST_PROCESS_V2_SEPARATE_COMPILATION=1 + static ; import testing ; -alias filesystem : /boost//filesystem : static ; - exe target : target.cpp : off windows:shell32 windows:Ntdll @@ -47,7 +46,7 @@ exe target : target.cpp : lib header_test : header_1.cpp header_2.cpp : BOOST_PROCESS_V2_HEADER_ONLY=1 ; -lib test_impl : test_impl.cpp filesystem : +lib test_impl : test_impl.cpp : BOOST_PROCESS_V2_SEPARATE_COMPILATION=1 BOOST_TEST_IGNORE_SIGCHLD=1 static From 5bdaa9f7e5be95b3486f5969d92bbc962b726121 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 02/12] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/build.jam b/build.jam index 29faa2d52..5bd365f71 100644 --- a/build.jam +++ b/build.jam @@ -10,24 +10,24 @@ feature boost.process.fs : boost std : optional propagated ; project /boost/process : common-requirements std:BOOST_PROCESS_USE_STD_FS=1 - boost:/boost/filesystem//boost_filesystem - /boost/algorithm//boost_algorithm - /boost/asio//boost_asio - /boost/assert//boost_assert - /boost/config//boost_config - /boost/core//boost_core - /boost/fusion//boost_fusion - /boost/io//boost_io - /boost/iterator//boost_iterator - /boost/move//boost_move - /boost/optional//boost_optional - /boost/system//boost_system - /boost/throw_exception//boost_throw_exception - /boost/tokenizer//boost_tokenizer - /boost/type_index//boost_type_index - /boost/type_traits//boost_type_traits - /boost/utility//boost_utility - /boost/winapi//boost_winapi + boost:/boost/filesystem//boost_filesystem + /boost/algorithm//boost_algorithm + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/move//boost_move + /boost/optional//boost_optional + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/tokenizer//boost_tokenizer + /boost/type_index//boost_type_index + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + /boost/winapi//boost_winapi include : default-build boost From 8f03815e200f6f42c1d75ce02a31d84c7370f8ba Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 03/12] Add requires-b2 check to top-level build file. --- build.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.jam b/build.jam index 5bd365f71..41545af7a 100644 --- a/build.jam +++ b/build.jam @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.1 ; + import feature : feature ; feature boost.process.fs : boost std : optional propagated ; From b17c9cd623be170255531935be017147dad0d34b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 14 May 2024 07:33:22 -0500 Subject: [PATCH 04/12] Add missing test deps. --- test/Jamfile.jam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 1c0c38452..cade7f63c 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -108,8 +108,8 @@ test-suite with-valgrind : [ run search_path.cpp : [ test-options search_path ] : : windows:shell32 ] [ run shell.cpp : [ test-options shell ] : sparring_partner : darwin:no ] [ run shell_path.cpp : [ test-options shell_path ] ] - [ run system_test1.cpp : [ test-options system_test1 ] : sparring_partner ] - [ run system_test2.cpp : [ test-options system_test2 ] : sparring_partner ] + [ run system_test1.cpp : [ test-options system_test1 ] : sparring_partner : /boost/chrono//boost_chrono ] + [ run system_test2.cpp : [ test-options system_test2 ] : sparring_partner : /boost/chrono//boost_chrono ] [ run spawn.cpp : [ test-options spawn ] : sparring_partner ] [ run start_dir.cpp : [ test-options start_dir ] : sparring_partner ] [ run terminate.cpp : [ test-options terminate ] : sparring_partner : freebsd:no ] From 4959292f54bfe5450d58be9b0e14c1cb40c7ff4b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 05/12] Bump B2 require to 5.2 --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 41545af7a..a4e0224bd 100644 --- a/build.jam +++ b/build.jam @@ -3,7 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; +require-b2 5.2 ; import feature : feature ; From 10156f1b6933f7922b93e99b349f39c039bb2897 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 18 Jul 2024 15:35:39 -0500 Subject: [PATCH 06/12] Fix duplicate def of boost.process.fs feature. --- build/Jamfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build/Jamfile b/build/Jamfile index 8ee33d6c0..85d00c5f3 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -18,9 +18,6 @@ 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 @@ -50,12 +47,10 @@ lib boost_process : process_sources : requirements BOOST_PROCESS_SOURCE=1 shared:BOOST_PROCESS_DYN_LINK=1 - boost:/boost//filesystem windows:shell32 windows:user32 windows:Ntdll windows:Advapi32 : usage-requirements shared:BOOST_PROCESS_DYN_LINK=1 - boost:/boost//filesystem ; From 7e1a419114a8cfd0c8f4de3b08a9425910f0b0a8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 10:00:52 -0500 Subject: [PATCH 07/12] Add missing boost_test dependency. --- test/v1/Jamfile.jam | 1 + test/v2/Jamfile.jam | 1 + 2 files changed, 2 insertions(+) diff --git a/test/v1/Jamfile.jam b/test/v1/Jamfile.jam index 9245414cb..4115badc6 100644 --- a/test/v1/Jamfile.jam +++ b/test/v1/Jamfile.jam @@ -23,6 +23,7 @@ project : requirements linux:-lpthread NT,cw:ws2_32 NT,gcc:ws2_32 + /boost/test//boost_test ; diff --git a/test/v2/Jamfile.jam b/test/v2/Jamfile.jam index 7c29b5ce6..0049d4434 100644 --- a/test/v2/Jamfile.jam +++ b/test/v2/Jamfile.jam @@ -28,6 +28,7 @@ project : requirements NT,gcc:Bcrypt BOOST_PROCESS_V2_SEPARATE_COMPILATION=1 static + /boost/test//boost_test ; import testing ; From cf88cd621eb2d4c25f0a070fa41fe931fea92389 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:24 -0500 Subject: [PATCH 08/12] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 37 ++++++++++++++++++++----------------- build/Jamfile | 1 + 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/build.jam b/build.jam index 4c23c282a..41601a92d 100644 --- a/build.jam +++ b/build.jam @@ -9,27 +9,29 @@ import feature : feature ; feature boost.process.fs : boost std : optional propagated ; +constant boost_dependencies : + /boost/algorithm//boost_algorithm + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/move//boost_move + /boost/optional//boost_optional + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/tokenizer//boost_tokenizer + /boost/type_index//boost_type_index + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + /boost/winapi//boost_winapi ; + project /boost/process : common-requirements std:BOOST_PROCESS_USE_STD_FS=1 boost:/boost/filesystem//boost_filesystem - /boost/algorithm//boost_algorithm - /boost/asio//boost_asio - /boost/assert//boost_assert - /boost/config//boost_config - /boost/core//boost_core - /boost/fusion//boost_fusion - /boost/io//boost_io - /boost/iterator//boost_iterator - /boost/move//boost_move - /boost/optional//boost_optional - /boost/system//boost_system - /boost/throw_exception//boost_throw_exception - /boost/tokenizer//boost_tokenizer - /boost/type_index//boost_type_index - /boost/type_traits//boost_type_traits - /boost/utility//boost_utility - /boost/winapi//boost_winapi include : default-build boost @@ -43,3 +45,4 @@ explicit call-if : boost-library process : install boost_process ; + diff --git a/build/Jamfile b/build/Jamfile index 85d00c5f3..f3aebe1d1 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -16,6 +16,7 @@ project : requirements windows:WIN32_LEAN_AND_MEAN linux:-lpthread : source-location ../src + : common-requirements $(boost_dependencies) ; alias process_sources From e9e57220493ddc77bc6b45174d8df6e5196e0591 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 25 Jul 2024 23:30:00 -0500 Subject: [PATCH 09/12] Switch to /boost/test//included target for header only mode of Boost.Test. --- test/v1/Jamfile.jam | 2 +- test/v2/Jamfile.jam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/v1/Jamfile.jam b/test/v1/Jamfile.jam index 4115badc6..cefa307e6 100644 --- a/test/v1/Jamfile.jam +++ b/test/v1/Jamfile.jam @@ -23,7 +23,7 @@ project : requirements linux:-lpthread NT,cw:ws2_32 NT,gcc:ws2_32 - /boost/test//boost_test + /boost/test//included ; diff --git a/test/v2/Jamfile.jam b/test/v2/Jamfile.jam index 0049d4434..87e44385b 100644 --- a/test/v2/Jamfile.jam +++ b/test/v2/Jamfile.jam @@ -28,7 +28,7 @@ project : requirements NT,gcc:Bcrypt BOOST_PROCESS_V2_SEPARATE_COMPILATION=1 static - /boost/test//boost_test + /boost/test//included ; import testing ; From 7eeafb0a10bd38ffd454b8e233f2ac6885cda3fd Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Jul 2024 11:32:02 -0500 Subject: [PATCH 10/12] Adjust doc build to avoid boost-root references. --- doc/Jamfile.jam | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Jamfile.jam b/doc/Jamfile.jam index ad9e3949c..5ed200775 100644 --- a/doc/Jamfile.jam +++ b/doc/Jamfile.jam @@ -19,12 +19,12 @@ install images_glob : $(images) : $(BOOST_ROOT)/doc/html/boost_process import type ; type.register XMLPROCESSWORKAROUND : : XML ; import generators ; -generators.register-standard common.copy : XML : XMLPROCESSWORKAROUND ; +generators.register-standard common.copy : XML : XMLPROCESSWORKAROUND ; xmlprocessworkaround posix_pseudocode : v1/posix_pseudocode.xml ; xmlprocessworkaround windows_pseudocode : v1/windows_pseudocode.xml ; -path-constant INCLUDES : ../../.. ; +path-constant INCLUDES : ../include ; doxygen reference_v1 : @@ -66,7 +66,7 @@ doxygen reference_v2 BOOST_PROCESS_V2_INITFN_AUTO_RESULT_TYPE(x,y)=deduced \\ BOOST_PROCESS_V2_COMPLETION_TOKEN_FOR(X)=Token \\ BOOST_PROCESS_V2_DEFAULT_COMPLETION_TOKEN_TYPE(E)=DEFAULT_TYPE \\ - BOOST_ASIO_DEFAULT_COMPLETION_TOKEN=DEFAULT \\ + BOOST_ASIO_DEFAULT_COMPLETION_TOKEN=DEFAULT \\ BOOST_CONSTEXPR=constexpr \\ BOOST_CXX14_CONSTEXPR=constexpr \\ BOOST_PROCESS_V2_INLINE= \\ @@ -98,7 +98,7 @@ boostbook standalone ############################################################################### alias boostdoc : standalone/docbook - : + : : images_glob : ; explicit boostdoc ; From 680929e4a3ca161fb1de5e7f48ec01b00fbbb998 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 6 Aug 2024 17:20:59 -0500 Subject: [PATCH 11/12] Update build deps. --- build.jam | 2 -- build/Jamfile | 5 ++++- example/Jamfile.jam | 1 + test/v1/Jamfile.jam | 12 ++++++++---- test/v2/Jamfile.jam | 1 + 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build.jam b/build.jam index 41601a92d..969e2a1e7 100644 --- a/build.jam +++ b/build.jam @@ -30,8 +30,6 @@ constant boost_dependencies : project /boost/process : common-requirements - std:BOOST_PROCESS_USE_STD_FS=1 - boost:/boost/filesystem//boost_filesystem include : default-build boost diff --git a/build/Jamfile b/build/Jamfile index f7383af70..e419f77ff 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -16,7 +16,10 @@ project : requirements windows:WIN32_LEAN_AND_MEAN linux:-lpthread : source-location ../src - : common-requirements $(boost_dependencies) + : common-requirements + $(boost_dependencies) + std:BOOST_PROCESS_USE_STD_FS=1 + boost:/boost/filesystem//boost_filesystem ; alias process_sources diff --git a/example/Jamfile.jam b/example/Jamfile.jam index d12ec4ef7..5ec31f042 100644 --- a/example/Jamfile.jam +++ b/example/Jamfile.jam @@ -8,6 +8,7 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) project : requirements + /boost/process//boost_process msvc:_SCL_SECURE_NO_WARNINGS windows:WIN32_LEAN_AND_MEAN ; diff --git a/test/v1/Jamfile.jam b/test/v1/Jamfile.jam index cefa307e6..db7647bfa 100644 --- a/test/v1/Jamfile.jam +++ b/test/v1/Jamfile.jam @@ -15,6 +15,7 @@ lib Advapi32 ; lib Ntdll ; project : requirements + /boost/process//boost_process BOOST_ASIO_NO_DEPRECATED msvc:_SCL_SECURE_NO_WARNINGS msvc:_CRT_SECURE_NO_DEPRECATE @@ -37,10 +38,13 @@ alias iostreams : /boost/iostreams//boost_iostreams ; alias system : /boost/system//boost_system ; alias thread : /boost/thread//boost_thread ; alias coroutine : /boost/coroutine//boost_coroutine : static ; +alias scope_exit : /boost/scope_exit//boost_scope_exit ; +alias lambda : /boost/lambda//boost_lambda ; +alias chrono : /boost/chrono//boost_chrono ; lib multi_ref : multi_ref1.cpp multi_ref2.cpp system : windows:shell32 ; -exe sparring_partner : sparring_partner.cpp program_options system filesystem iostreams : +exe sparring_partner : sparring_partner.cpp program_options system filesystem iostreams lambda : off windows:shell32 windows:Ntdll ; @@ -96,15 +100,15 @@ test-suite with-valgrind : [ run env.cpp program_options system filesystem : [ test-options env ] : sparring_partner ] [ run group.cpp system thread filesystem : [ test-options group ] : sub_launch ] [ run group.cpp system thread filesystem : [ test-options group ] : sub_launch : no windows:yes BOOST_USE_WINDOWS_H=1 : group-windows-h ] - [ run group_wait.cpp system thread filesystem : [ test-options group_wait ] : sparring_partner : darwin:no freebsd:no ] + [ run group_wait.cpp system thread filesystem scope_exit : [ test-options group_wait ] : sparring_partner : darwin:no freebsd:no ] [ run limit_fd.cpp program_options system filesystem : [ test-options limit_fd ] : sparring_partner : freebsd:no ] [ run run_exe.cpp filesystem : : sparring_partner ] [ run run_exe_path.cpp filesystem : [ test-options run_exe_path ] : sparring_partner ] [ run search_path.cpp filesystem system : [ test-options search_path ] : : windows:shell32 ] [ run shell.cpp filesystem system : [ test-options shell ] : sparring_partner : darwin:no ] [ run shell_path.cpp filesystem system : [ test-options shell_path ] ] - [ run system_test1.cpp filesystem system : [ test-options system_test1 ] : sparring_partner ] - [ run system_test2.cpp filesystem system : [ test-options system_test2 ] : sparring_partner ] + [ run system_test1.cpp filesystem system chrono : [ test-options system_test1 ] : sparring_partner ] + [ run system_test2.cpp filesystem system chrono : [ test-options system_test2 ] : sparring_partner ] [ run spawn.cpp filesystem system : [ test-options spawn ] : sparring_partner ] [ run start_dir.cpp filesystem system : [ test-options start_dir ] : sparring_partner ] [ run terminate.cpp system filesystem : [ test-options terminate ] : sparring_partner : freebsd:no ] diff --git a/test/v2/Jamfile.jam b/test/v2/Jamfile.jam index 87e44385b..d95e88047 100644 --- a/test/v2/Jamfile.jam +++ b/test/v2/Jamfile.jam @@ -12,6 +12,7 @@ lib user32 ; lib Bcrypt ; project : requirements + /boost/process//boost_process BOOST_ASIO_NO_DEPRECATED msvc:_SCL_SECURE_NO_WARNINGS msvc:_CRT_SECURE_NO_DEPRECATE From 575200656831c218fe1850f5a3825f7a2874945a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 7 Aug 2024 22:12:32 -0500 Subject: [PATCH 12/12] Fix link and build of deps. --- build/Jamfile | 3 ++- test/v1/Jamfile.jam | 18 +++++++++--------- test/v2/Jamfile.jam | 4 +--- test/v2/process.cpp | 17 +++++++---------- test/v2/windows.cpp | 4 ---- 5 files changed, 19 insertions(+), 27 deletions(-) diff --git a/build/Jamfile b/build/Jamfile index e419f77ff..40192534c 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -19,7 +19,6 @@ project : requirements : common-requirements $(boost_dependencies) std:BOOST_PROCESS_USE_STD_FS=1 - boost:/boost/filesystem//boost_filesystem ; alias process_sources @@ -51,10 +50,12 @@ lib boost_process : process_sources : requirements BOOST_PROCESS_SOURCE=1 shared:BOOST_PROCESS_DYN_LINK=1 + boost:/boost/filesystem//boost_filesystem windows:shell32 windows:user32 windows:ntdll windows:advapi32 : usage-requirements shared:BOOST_PROCESS_DYN_LINK=1 + boost:/boost/filesystem//boost_filesystem ; diff --git a/test/v1/Jamfile.jam b/test/v1/Jamfile.jam index db7647bfa..c75860db2 100644 --- a/test/v1/Jamfile.jam +++ b/test/v1/Jamfile.jam @@ -32,15 +32,15 @@ project : requirements import testing ; -alias program_options : /boost/program_options//boost_program_options : static ; -alias filesystem : /boost/filesystem//boost_filesystem ; -alias iostreams : /boost/iostreams//boost_iostreams ; -alias system : /boost/system//boost_system ; -alias thread : /boost/thread//boost_thread ; -alias coroutine : /boost/coroutine//boost_coroutine : static ; -alias scope_exit : /boost/scope_exit//boost_scope_exit ; -alias lambda : /boost/lambda//boost_lambda ; -alias chrono : /boost/chrono//boost_chrono ; +alias program_options : usage-requirements /boost/program_options//boost_program_options ; +alias filesystem : usage-requirements /boost/filesystem//boost_filesystem ; +alias iostreams : usage-requirements /boost/iostreams//boost_iostreams ; +alias system : usage-requirements /boost/system//boost_system ; +alias thread : usage-requirements /boost/thread//boost_thread ; +alias coroutine : usage-requirements /boost/coroutine//boost_coroutine ; +alias scope_exit : usage-requirements /boost/scope_exit//boost_scope_exit ; +alias lambda : usage-requirements /boost/lambda//boost_lambda ; +alias chrono : usage-requirements /boost/chrono//boost_chrono ; lib multi_ref : multi_ref1.cpp multi_ref2.cpp system : windows:shell32 ; diff --git a/test/v2/Jamfile.jam b/test/v2/Jamfile.jam index d95e88047..3b7769601 100644 --- a/test/v2/Jamfile.jam +++ b/test/v2/Jamfile.jam @@ -28,7 +28,6 @@ project : requirements NT,gcc:ws2_32 NT,gcc:Bcrypt BOOST_PROCESS_V2_SEPARATE_COMPILATION=1 - static /boost/test//included ; @@ -39,10 +38,9 @@ exe target : target.cpp : windows:Ntdll ; -lib test_impl : test_impl.cpp /boost/filesystem//boost_filesystem /boost/process//boost_process : +lib test_impl : test_impl.cpp /boost/process//boost_process : BOOST_PROCESS_V2_SEPARATE_COMPILATION=1 BOOST_TEST_IGNORE_SIGCHLD=1 - static ; test-suite standalone : diff --git a/test/v2/process.cpp b/test/v2/process.cpp index 0a4009a18..895370dd9 100644 --- a/test/v2/process.cpp +++ b/test/v2/process.cpp @@ -9,9 +9,6 @@ #define BOOST_ALL_NO_LIB 1 #endif // !defined(BOOST_ALL_NO_LIB) -#if defined(BOOST_FILESYSTEM_DYN_LINK) -#undef BOOST_FILESYSTEM_DYN_LINK -#endif #define BOOST_TEST_IGNORE_SIGCHLD 1 #if true //defined(BOOST_POSIX_API) @@ -55,9 +52,9 @@ BOOST_AUTO_TEST_CASE(exit_code_sync) { using boost::unit_test::framework::master_test_suite; const auto pth = master_test_suite().argv[1]; - + boost::asio::io_context ctx; - + BOOST_CHECK_EQUAL(bpv::process(ctx, pth, {"exit-code", "0"}).wait(), 0); BOOST_CHECK_EQUAL(bpv::execute(bpv::process(ctx, pth, {"exit-code", "1"})), 1); std::vector args = {"exit-code", "2"}; @@ -85,7 +82,7 @@ BOOST_AUTO_TEST_CASE(exit_code_async) int called = 0; printf("Setting up processes\n"); - + bpv::process proc1(ctx, pth, {"exit-code", "0"}); bpv::process proc3(ctx, pth, {"exit-code", "2"}); bpv::process proc4(ctx, pth, {"exit-code", "42"}); @@ -200,7 +197,7 @@ BOOST_AUTO_TEST_CASE(print_args_out) { using boost::unit_test::framework::master_test_suite; const auto pth = master_test_suite().argv[1]; - + asio::io_context ctx; asio::readable_pipe rp{ctx}; @@ -296,7 +293,7 @@ BOOST_AUTO_TEST_CASE(echo_file) { using boost::unit_test::framework::master_test_suite; const auto pth = master_test_suite().argv[1]; - + asio::io_context ctx; asio::readable_pipe rp{ctx}; @@ -476,7 +473,7 @@ BOOST_AUTO_TEST_CASE(environment) sub_env.push_back("FOOBAR=FOO-BAR"); BOOST_CHECK_EQUAL("FOO-BAR", read_env("FOOBAR", bpv::process_environment{sub_env})); - + sub_env.push_back("XYZ=ZYX"); auto itr = std::find_if(sub_env.begin(), sub_env.end(), [](const bpv::environment::key_value_pair & kv) {return kv.key() == bpv::environment::key("PATH");}); path += static_cast(bpv::environment::delimiter); @@ -511,7 +508,7 @@ BOOST_AUTO_TEST_CASE(exit_code_as_error) bpv::process proc3(ctx, pth, {"sleep", "2000"}); int called = 0; - + proc3.terminate(); diff --git a/test/v2/windows.cpp b/test/v2/windows.cpp index b58cb5983..254f1ad7d 100644 --- a/test/v2/windows.cpp +++ b/test/v2/windows.cpp @@ -9,10 +9,6 @@ #define BOOST_ALL_NO_LIB 1 #endif // !defined(BOOST_ALL_NO_LIB) -#if defined(BOOST_FILESYSTEM_DYN_LINK) -#undef BOOST_FILESYSTEM_DYN_LINK -#endif - // Test that header file is self-contained. #include