From 7bd6727bfc9ea8f59ca62b3121fb3684ef6ba4b2 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:16 -0500 Subject: [PATCH] Make the library modular usable. --- Jamfile.v2 | 5 ----- build.jam | 29 +++++++++++++++++++++++++++++ example/Jamfile.v2 | 34 ++++++++++++---------------------- test/Jamfile.v2 | 24 +++++++++++++----------- 4 files changed, 54 insertions(+), 38 deletions(-) delete mode 100644 Jamfile.v2 create mode 100644 build.jam diff --git a/Jamfile.v2 b/Jamfile.v2 deleted file mode 100644 index 8333597..0000000 --- a/Jamfile.v2 +++ /dev/null @@ -1,5 +0,0 @@ -import testing ; - -# Tests from Jamfiles in individual library test subdirectories -build-project example ; # test-suite interprocess_example -build-project test ; # test-suite interprocess_test \ No newline at end of file diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..f05a3d3 --- /dev/null +++ b/build.jam @@ -0,0 +1,29 @@ +# Copyright René Ferdinand Rivera Morell 2023 +# 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 project ; + +project /boost/interprocess + : common-requirements + /boost/assert//boost_assert + /boost/config//boost_config + /boost/container//boost_container + /boost/core//boost_core + /boost/intrusive//boost_intrusive + /boost/move//boost_move + /boost/static_assert//boost_static_assert + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered + /boost/winapi//boost_winapi + include + ; + +explicit + [ alias boost_interprocess ] + [ alias all : boost_interprocess example test ] + ; + +call-if : boost-library interprocess + ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 22da3e0..223d906 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -15,38 +15,28 @@ # the run rule for each source, the result is a list of all # the run rules, which we can pass on to the test_suite rule: +project : requirements + acc:-lrt + acc-pa_risc:-lrt + gcc,windows:"-lole32 -loleaut32 -lpsapi -ladvapi32" + hpux,gcc:"-Wl,+as,mpas" + windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" + linux:"-lrt" + /boost/multi_index//boost_multi_index + ; + rule test_all { local all_rules = ; for local fileb in [ glob comp*.cpp ] { - all_rules += [ link $(fileb) - : # additional args - acc:-lrt - acc-pa_risc:-lrt - gcc,windows:"-lole32 -loleaut32 -lpsapi -ladvapi32" - hpux,gcc:"-Wl,+as,mpas" - windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" - linux:"-lrt" - : # test-files - : # requirements - ] ; + all_rules += [ link $(fileb) ] ; } for local fileb in [ glob doc_*.cpp ] { - all_rules += [ run $(fileb) - : # additional args - : # test-files - : # requirements - acc:-lrt - acc-pa_risc:-lrt - gcc-mingw:"-lole32 -loleaut32 -lpsapi -ladvapi32" - hpux,gcc:"-Wl,+as,mpas" - windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" - linux:"-lrt" - ] ; + all_rules += [ run $(fileb) ] ; } return $(all_rules) ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index a09bf8f..b2f54cf 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -15,23 +15,25 @@ # the run rule for each source, the result is a list of all # the run rules, which we can pass on to the test_suite rule: +project : requirements + /boost/date_time//boost_date_time + /boost/multi_index//boost_multi_index + acc:-lrt + acc-pa_risc:-lrt + gcc,windows:"-lole32 -loleaut32 -lpsapi -ladvapi32" + hpux,gcc:"-Wl,+as,mpas" + windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" + linux:"-lrt" + /boost/chrono//boost_chrono + ; + rule test_all { local all_rules = ; for local fileb in [ glob *.cpp ] { - all_rules += [ run $(fileb) - : # additional args - : # test-files - : # requirements - acc:-lrt - acc-pa_risc:-lrt - gcc,windows:"-lole32 -loleaut32 -lpsapi -ladvapi32" - hpux,gcc:"-Wl,+as,mpas" - windows,clang:"-lole32 -loleaut32 -lpsapi -ladvapi32" - linux:"-lrt" - ] ; + all_rules += [ run $(fileb) ] ; } return $(all_rules) ;