From 495539ce4404bde4af187ccc072235a6a7446e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ferdinand=20Rivera=20Morell?= Date: Wed, 21 Aug 2024 20:51:29 -0500 Subject: [PATCH] Add support for modular build structure. (#274) * Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add missing import-search for cconfig/predef checks. * Add requires-b2 check to top-level build file. * Bump B2 require to 5.2 * Change all references to . * Update copyright dates. * Move inter-lib dependencies to a project variable and into the build targets. * Update build deps. --- build.jam | 34 ++++++++++++++++++++++++++++++++++ test/Jamfile | 18 ++++++++++-------- 2 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..80964a55c --- /dev/null +++ b/build.jam @@ -0,0 +1,34 @@ +# Copyright René Ferdinand Rivera Morell 2023-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) + +require-b2 5.2 ; + +constant boost_dependencies : + /boost/config//boost_config + /boost/container_hash//boost_container_hash + /boost/core//boost_core + /boost/function_types//boost_function_types + /boost/functional//boost_functional + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/static_assert//boost_static_assert + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/utility//boost_utility ; + +project /boost/fusion + : common-requirements + include + ; + +explicit + [ alias boost_fusion : : : : $(boost_dependencies) ] + [ alias all : boost_fusion test ] + ; + +call-if : boost-library fusion + ; + diff --git a/test/Jamfile b/test/Jamfile index 168fdc160..02eacf4db 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -10,7 +10,8 @@ # bring in rules for testing import testing ; import os ; -import ../../config/checks/config : requires ; +import-search /boost/config/checks ; +import config : requires ; if [ os.environ CI ] { @@ -19,14 +20,15 @@ if [ os.environ CI ] project : requirements + /boost/fusion//boost_fusion $(CI_DEFINES) ; { test-suite fusion : - [ run algorithm/all.cpp ] - [ run algorithm/any.cpp ] + [ run algorithm/all.cpp : : : /boost/lambda//boost_lambda ] + [ run algorithm/any.cpp : : : /boost/lambda//boost_lambda ] [ run algorithm/clear.cpp ] [ run algorithm/copy.cpp ] [ run algorithm/count.cpp ] @@ -44,8 +46,8 @@ project [ run algorithm/iter_fold.cpp ] [ run algorithm/move.cpp : : : [ requires cxx11_rvalue_references ] ] - [ run algorithm/none.cpp ] - [ run algorithm/pop_back.cpp ] + [ run algorithm/none.cpp : : : /boost/lambda//boost_lambda ] + [ run algorithm/pop_back.cpp : : : /boost/array//boost_array ] [ run algorithm/pop_front.cpp ] [ run algorithm/push_back.cpp ] [ run algorithm/push_front.cpp ] @@ -76,7 +78,7 @@ project [ run sequence/as_vector.cpp ] [ run sequence/boost_tuple.cpp ] [ run sequence/boost_tuple_iterator.cpp ] - [ run sequence/cons.cpp ] + [ run sequence/cons.cpp : : : /boost/lambda//boost_lambda ] [ run sequence/convert_boost_tuple.cpp ] [ run sequence/convert_deque.cpp ] [ run sequence/convert_list.cpp ] @@ -134,7 +136,7 @@ project [ run sequence/set.cpp ] [ run sequence/single_view.cpp ] [ run sequence/std_pair.cpp ] - [ run sequence/boost_array.cpp ] + [ run sequence/boost_array.cpp : : : /boost/array//boost_array ] [ run sequence/array.cpp ] [ run sequence/std_array.cpp : : : [ requires cxx11_hdr_array ] ] @@ -241,7 +243,7 @@ project [ compile sequence/github-159.cpp ] [ run sequence/github-176.cpp ] - [ compile sequence/size.cpp ] + [ compile sequence/size.cpp : /boost/array//boost_array ] [ run functional/fused.cpp ] [ run functional/fused_function_object.cpp ]