Skip to content

Commit 0fd179f

Browse files
authored
Add support for modular build structure. (#111)
This is part of the effort to make the Boost libraries "modular" for build and consumption. See https://lists.boost.org/Archives/boost/2024/01/255704.php and https://github.com/grafikrobot/boost-b2-modular/blob/b2-modular/README.adoc for more information. This PR depends on the following other PRs being merged to both develop and master branches of the respective repos: - boostorg/boost#854
1 parent b33ff4f commit 0fd179f

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

build.jam

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright René Ferdinand Rivera Morell 2023-2024
2+
# Distributed under the Boost Software License, Version 1.0.
3+
# (See accompanying file LICENSE_1_0.txt or copy at
4+
# http://www.boost.org/LICENSE_1_0.txt)
5+
6+
require-b2 5.2 ;
7+
8+
constant boost_dependencies :
9+
/boost/assert//boost_assert
10+
/boost/config//boost_config
11+
/boost/container_hash//boost_container_hash
12+
/boost/core//boost_core
13+
/boost/detail//boost_detail
14+
/boost/integer//boost_integer
15+
/boost/mpl//boost_mpl
16+
/boost/preprocessor//boost_preprocessor
17+
/boost/static_assert//boost_static_assert
18+
/boost/throw_exception//boost_throw_exception
19+
/boost/type_index//boost_type_index
20+
/boost/type_traits//boost_type_traits
21+
/boost/utility//boost_utility ;
22+
23+
project /boost/variant
24+
: common-requirements
25+
<include>include
26+
;
27+
28+
explicit
29+
[ alias boost_variant : : : : <library>$(boost_dependencies) ]
30+
[ alias all : boost_variant test ]
31+
;
32+
33+
call-if : boost-library variant
34+
;
35+

test/Jamfile.v2

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88
# http://www.boost.org/LICENSE_1_0.txt)
99
#
1010

11+
require-b2 5.0.1 ;
12+
import-search /boost/config/checks ;
13+
import config : requires ;
1114
import testing ;
12-
import ../../config/checks/config : requires ;
1315

1416
local below_cpp14 = 98 03 0x 11 ;
1517
local since_cpp20 = 2a 20 latest ;
1618

1719
project
1820
: requirements
21+
<library>/boost/variant//boost_variant
1922
[ requires cxx11_rvalue_references ]
2023
<toolset>msvc:<asynch-exceptions>on
2124
;
@@ -30,7 +33,7 @@ test-suite variant
3033
[ run test6.cpp : : : : variant_test6 ]
3134
[ run test7.cpp : : : : variant_test7 ]
3235
[ run test8.cpp : : : : variant_test8 ]
33-
[ run test9.cpp : : : : variant_test9 ]
36+
[ run test9.cpp : : : <library>/boost/fusion//boost_fusion : variant_test9 ]
3437
[ run recursive_variant_test.cpp ]
3538
[ run variant_reference_test.cpp ]
3639
[ run variant_comparison_test.cpp ]
@@ -39,7 +42,7 @@ test-suite variant
3942
[ run variant_get_test.cpp ]
4043
[ compile-fail variant_rvalue_get_with_ampersand_test.cpp ]
4144
[ compile-fail no_rvalue_to_nonconst_visitation.cpp ]
42-
[ compile fusion_interop.cpp ]
45+
[ compile fusion_interop.cpp : <library>/boost/fusion//boost_fusion ]
4346
[ run variant_polymorphic_get_test.cpp ]
4447
[ run variant_multivisit_test.cpp ]
4548
[ run hash_variant_test.cpp ]
@@ -58,13 +61,13 @@ test-suite variant
5861
[ run recursive_variant_test.cpp : : : <rtti>off <define>BOOST_NO_RTTI <define>BOOST_NO_TYPEID : variant_no_rtti_test ]
5962
[ run hash_recursive_variant_test.cpp ]
6063
[ run variant_swap_test.cpp ]
61-
[ run auto_visitors.cpp ]
64+
[ run auto_visitors.cpp : : : <library>/boost/lexical_cast//boost_lexical_cast ]
6265
[ run issue42.cpp ]
63-
[ run issue53.cpp ]
66+
[ run issue53.cpp : : : <library>/boost/thread//boost_thread ]
6467
[ run overload_selection.cpp : : : "<cxxstd>$(since_cpp20)"\:<build>no ]
65-
[ run recursive_wrapper_move_test.cpp ]
68+
[ run recursive_wrapper_move_test.cpp : : : <library>/boost/array//boost_array ]
6669
[ run variant_over_joint_view_test.cpp ]
67-
[ run const_ref_apply_visitor.cpp ]
68-
;
70+
[ run const_ref_apply_visitor.cpp : : : <library>/boost/lexical_cast//boost_lexical_cast ]
71+
;
6972

7073

0 commit comments

Comments
 (0)