Add support for modular build structure. (#73)

* Make the library modular usable.

* Put back removing qualified boostcpp tag. As we need it until the Jamroot removes the qualified tag.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Remove uses of BOOST_ROOT in Jamfiles.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* 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-10-12 02:18:24 -05:00 committed by GitHub
parent 47d36ce8e2
commit 60ff77c181
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 61 additions and 21 deletions

38
build.jam Normal file
View File

@ -0,0 +1,38 @@
# 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/assert//boost_assert
/boost/bind//boost_bind
/boost/config//boost_config
/boost/container_hash//boost_container_hash
/boost/core//boost_core
/boost/integer//boost_integer
/boost/iterator//boost_iterator
/boost/move//boost_move
/boost/mpl//boost_mpl
/boost/preprocessor//boost_preprocessor
/boost/smart_ptr//boost_smart_ptr
/boost/static_assert//boost_static_assert
/boost/throw_exception//boost_throw_exception
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility ;
project /boost/multi_index
: common-requirements
<include>include
;
explicit
[ alias boost_multi_index : : : : <library>$(boost_dependencies) ]
[ alias all : boost_multi_index example perf test ]
;
call-if : boost-library multi_index
;

View File

@ -1,69 +1,66 @@
# Boost.MultiIndex examples Jamfile
#
# Copyright 2003-2007 Joaquín M López Muñoz.
# Copyright 2003-2007 Joaqu<EFBFBD>n M L<>pez Mu<4D>oz.
# 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)
#
# See http://www.boost.org/libs/multi_index for library home page.
project : requirements <library>/boost/multi_index//boost_multi_index ;
exe basic
: basic.cpp
: <include>$(BOOST_ROOT)
;
exe bimap
: bimap.cpp
: <include>$(BOOST_ROOT)
;
exe complex_structs
: complex_structs.cpp
: <include>$(BOOST_ROOT)
;
exe composite_keys
: composite_keys.cpp
: <include>$(BOOST_ROOT)
/boost/tokenizer//boost_tokenizer
;
exe fun_key
: fun_key.cpp
: <include>$(BOOST_ROOT)
;
exe hashed
: hashed.cpp
: <include>$(BOOST_ROOT)
/boost/tokenizer//boost_tokenizer
;
exe ip_allocator
: ip_allocator.cpp
: <include>$(BOOST_ROOT) <threading>multi
/boost/interprocess//boost_interprocess
: <threading>multi
;
exe non_default_ctor
: non_default_ctor.cpp
: <include>$(BOOST_ROOT)
;
exe random_access
: random_access.cpp
: <include>$(BOOST_ROOT)
/boost/tokenizer//boost_tokenizer
;
exe rearrange
: rearrange.cpp
: <include>$(BOOST_ROOT)
/boost/random//boost_random
;
exe sequenced
: sequenced.cpp
: <include>$(BOOST_ROOT)
/boost/tokenizer//boost_tokenizer
;
exe serialization
: serialization.cpp
/boost/serialization//boost_serialization
: <include>$(BOOST_ROOT)
;

View File

@ -1,12 +1,14 @@
# Boost.MultiIndex performance tests Jamfile
#
# Copyright 2003-2006 Joaqu匤 M L<>ez Mu<4D>z.
# Copyright 2003-2006 Joaqu<EFBFBD>n M L<>pez Mu<4D>oz.
# 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)
#
# See http://www.boost.org/libs/multi_index for library home page.
project : requirements <library>/boost/multi_index//boost_multi_index ;
exe test_perf
: test_perf.cpp
: <include>$(BOOST_ROOT)

View File

@ -1,6 +1,6 @@
# Boost.MultiIndex tests Jamfile
#
# Copyright 2003-2020 Joaquín M López Muñoz.
# Copyright 2003-2020 Joaqu<EFBFBD>n M L<>pez Mu<4D>oz.
# 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)
@ -18,8 +18,8 @@ import type ;
# Problem bypassed by changing the EXE names containing a taboo word.
# Thanks to Rene Rivera for guidance on the use of the <tag> feature.
rule change-test_update-exe-name ( name : type ? : property-set )
{
rule change-test_update-exe-name ( name : type ? : property-set )
{
if [ os.on-windows ] && [ type.is-subtype $(type) EXE ]
{
return test_updat.exe ;
@ -28,6 +28,7 @@ rule change-test_update-exe-name ( name : type ? : property-set )
project
: requirements
<library>/boost/multi_index//boost_multi_index
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>msvc:<define>_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
@ -46,7 +47,8 @@ test-suite "multi_index" :
[ run test_conv_iterators.cpp test_conv_iterators_main.cpp ]
[ run test_copy_assignment.cpp test_copy_assignment_main.cpp ]
[ run test_hash_ops.cpp test_hash_ops_main.cpp ]
[ run test_iterators.cpp test_iterators_main.cpp ]
[ run test_iterators.cpp test_iterators_main.cpp
/boost/foreach//boost_foreach ]
[ run test_key.cpp test_key_main.cpp
: : :
[ check-target-builds boost_multi_index_key_supported
@ -57,7 +59,7 @@ test-suite "multi_index" :
[ run test_modifiers.cpp test_modifiers_main.cpp ]
[ run test_mpl_ops.cpp test_mpl_ops_main.cpp ]
[ run test_node_handling.cpp test_node_handling_main.cpp ]
[ run test_observers.cpp test_observers_main.cpp ]
[ run test_observers.cpp test_observers_main.cpp ]
[ run test_projection.cpp test_projection_main.cpp ]
[ run test_range.cpp test_range_main.cpp ]
[ run test_rank_ops.cpp test_rank_ops_main.cpp ]
@ -69,8 +71,9 @@ test-suite "multi_index" :
/boost/serialization//boost_serialization ]
[ run test_set_ops.cpp test_set_ops_main.cpp ]
[ run test_special_set_ops.cpp test_special_set_ops_main.cpp ]
[ run test_update.cpp test_update_main.cpp
: : :
[ run test_update.cpp test_update_main.cpp
: : :
-<tag>@%boostcpp.tag
-<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
<tag>@change-test_update-exe-name ]
;