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 <source> references to <library>.

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Update build deps.
This commit is contained in:
René Ferdinand Rivera Morell
2024-08-21 20:51:29 -05:00
committed by GitHub
parent f86ddcce37
commit 495539ce44
2 changed files with 44 additions and 8 deletions

34
build.jam Normal file
View File

@ -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>include
;
explicit
[ alias boost_fusion : : : : <library>$(boost_dependencies) ]
[ alias all : boost_fusion test ]
;
call-if : boost-library fusion
;

View File

@ -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
<library>/boost/fusion//boost_fusion
$(CI_DEFINES)
;
{
test-suite fusion :
[ run algorithm/all.cpp ]
[ run algorithm/any.cpp ]
[ run algorithm/all.cpp : : : <library>/boost/lambda//boost_lambda ]
[ run algorithm/any.cpp : : : <library>/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 : : : <library>/boost/lambda//boost_lambda ]
[ run algorithm/pop_back.cpp : : : <library>/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 : : : <library>/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 : : : <library>/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 : <library>/boost/array//boost_array ]
[ run functional/fused.cpp ]
[ run functional/fused_function_object.cpp ]