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 # 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. # Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at # (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt) # http://www.boost.org/LICENSE_1_0.txt)
# #
# See http://www.boost.org/libs/multi_index for library home page. # See http://www.boost.org/libs/multi_index for library home page.
project : requirements <library>/boost/multi_index//boost_multi_index ;
exe basic exe basic
: basic.cpp : basic.cpp
: <include>$(BOOST_ROOT)
; ;
exe bimap exe bimap
: bimap.cpp : bimap.cpp
: <include>$(BOOST_ROOT)
; ;
exe complex_structs exe complex_structs
: complex_structs.cpp : complex_structs.cpp
: <include>$(BOOST_ROOT)
; ;
exe composite_keys exe composite_keys
: composite_keys.cpp : composite_keys.cpp
: <include>$(BOOST_ROOT) /boost/tokenizer//boost_tokenizer
; ;
exe fun_key exe fun_key
: fun_key.cpp : fun_key.cpp
: <include>$(BOOST_ROOT)
; ;
exe hashed exe hashed
: hashed.cpp : hashed.cpp
: <include>$(BOOST_ROOT) /boost/tokenizer//boost_tokenizer
; ;
exe ip_allocator exe ip_allocator
: ip_allocator.cpp : ip_allocator.cpp
: <include>$(BOOST_ROOT) <threading>multi /boost/interprocess//boost_interprocess
: <threading>multi
; ;
exe non_default_ctor exe non_default_ctor
: non_default_ctor.cpp : non_default_ctor.cpp
: <include>$(BOOST_ROOT)
; ;
exe random_access exe random_access
: random_access.cpp : random_access.cpp
: <include>$(BOOST_ROOT) /boost/tokenizer//boost_tokenizer
; ;
exe rearrange exe rearrange
: rearrange.cpp : rearrange.cpp
: <include>$(BOOST_ROOT) /boost/random//boost_random
; ;
exe sequenced exe sequenced
: sequenced.cpp : sequenced.cpp
: <include>$(BOOST_ROOT) /boost/tokenizer//boost_tokenizer
; ;
exe serialization exe serialization
: serialization.cpp : serialization.cpp
/boost/serialization//boost_serialization /boost/serialization//boost_serialization
: <include>$(BOOST_ROOT)
; ;

View File

@ -1,12 +1,14 @@
# Boost.MultiIndex performance tests Jamfile # 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. # Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at # (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt) # http://www.boost.org/LICENSE_1_0.txt)
# #
# See http://www.boost.org/libs/multi_index for library home page. # See http://www.boost.org/libs/multi_index for library home page.
project : requirements <library>/boost/multi_index//boost_multi_index ;
exe test_perf exe test_perf
: test_perf.cpp : test_perf.cpp
: <include>$(BOOST_ROOT) : <include>$(BOOST_ROOT)

View File

@ -1,6 +1,6 @@
# Boost.MultiIndex tests Jamfile # 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. # Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at # (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt) # http://www.boost.org/LICENSE_1_0.txt)
@ -28,6 +28,7 @@ rule change-test_update-exe-name ( name : type ? : property-set )
project project
: requirements : requirements
<library>/boost/multi_index//boost_multi_index
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS <toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS <toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>msvc:<define>_SILENCE_ALL_CXX17_DEPRECATION_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_conv_iterators.cpp test_conv_iterators_main.cpp ]
[ run test_copy_assignment.cpp test_copy_assignment_main.cpp ] [ run test_copy_assignment.cpp test_copy_assignment_main.cpp ]
[ run test_hash_ops.cpp test_hash_ops_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 [ run test_key.cpp test_key_main.cpp
: : : : : :
[ check-target-builds boost_multi_index_key_supported [ check-target-builds boost_multi_index_key_supported
@ -71,6 +73,7 @@ test-suite "multi_index" :
[ run test_special_set_ops.cpp test_special_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>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
<tag>@change-test_update-exe-name ] <tag>@change-test_update-exe-name ]
; ;