Skip to content

Commit 7f07838

Browse files
authored
Merge pull request #121 from grafikrobot/modular
Add support for modular build structure.
2 parents faac048 + bbfcdf1 commit 7f07838

File tree

10 files changed

+111
-68
lines changed

10 files changed

+111
-68
lines changed

Jamfile

-11
This file was deleted.

build.jam

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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/array//boost_array
10+
/boost/assert//boost_assert
11+
/boost/bind//boost_bind
12+
/boost/concept_check//boost_concept_check
13+
/boost/config//boost_config
14+
/boost/core//boost_core
15+
/boost/exception//boost_exception
16+
/boost/function//boost_function
17+
/boost/iterator//boost_iterator
18+
/boost/mpl//boost_mpl
19+
/boost/range//boost_range
20+
/boost/regex//boost_regex
21+
/boost/static_assert//boost_static_assert
22+
/boost/throw_exception//boost_throw_exception
23+
/boost/tuple//boost_tuple
24+
/boost/type_traits//boost_type_traits
25+
/boost/unordered//boost_unordered ;
26+
27+
project /boost/algorithm
28+
: common-requirements
29+
<include>include
30+
;
31+
32+
explicit
33+
[ alias boost_algorithm : : : : <library>$(boost_dependencies) ]
34+
[ alias all : boost_algorithm test
35+
example
36+
minmax/example minmax/test
37+
string/example string/test
38+
]
39+
;
40+
41+
call-if : boost-library algorithm
42+
;

doc/Jamfile.v2

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ using quickbook ;
1616
using doxygen ;
1717
using boostbook ;
1818

19-
doxygen autodoc
20-
:
21-
[ glob ../../../boost/algorithm/*.hpp
22-
../../../boost/algorithm/searching/*.hpp
23-
../../../boost/algorithm/cxx11/*.hpp
24-
../../../boost/algorithm/cxx14/*.hpp
25-
../../../boost/algorithm/cxx17/*.hpp
19+
doxygen autodoc
20+
:
21+
[ glob ../include/boost/algorithm/*.hpp
22+
../include/boost/algorithm/searching/*.hpp
23+
../include/boost/algorithm/cxx11/*.hpp
24+
../include/boost/algorithm/cxx14/*.hpp
25+
../include/boost/algorithm/cxx17/*.hpp
2626
]
27-
:
27+
:
2828
<doxygen:param>"PREDEFINED=\"BOOST_ALGORITHM_DOXYGEN=1\""
2929
<doxygen:param>WARNINGS=YES # Default NO, but useful to see warnings, especially in a logfile.
30-
;
30+
;
3131

3232

3333
xml algorithm : algorithm.qbk ;
@@ -36,7 +36,7 @@ boostbook standalone
3636
:
3737
algorithm
3838
:
39-
<dependency>autodoc
39+
<dependency>autodoc
4040
<xsl:param>boost.root=../../../..
4141
<xsl:param>"boost.doxygen.reftitle=Boost.Algorithms C++ Reference"
4242
<xsl:param>chapter.autolabel=0

example/Jamfile.v2

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
# See http://www.boost.org for updates, documentation, and revision history.
99

1010

11-
project /boost/algorithm/example
11+
project
1212
: requirements
13-
<include>../../../
13+
<library>/boost/algorithm//boost_algorithm
1414
<optimization>speed
1515
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
1616
<toolset>msvc:<define>NOMINMAX

minmax/example/Jamfile

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
# http://www.boost.org/LICENSE_1_0.txt)
88
#
99

10+
project
11+
: requirements
12+
<library>/boost/algorithm//boost_algorithm
13+
<library>/boost/timer//boost_timer ;
14+
1015
exe minmax_ex : minmax_ex.cpp ;
1116
exe minmax_timer : minmax_timer.cpp ;
1217

minmax/test/Jamfile.v2

+5-3
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@
99

1010
import testing ;
1111

12+
project : requirements <library>/boost/algorithm//boost_algorithm ;
13+
1214
alias unit_test_framework
1315
: # sources
14-
/boost//unit_test_framework
15-
;
16+
/boost/test//boost_unit_test_framework
17+
;
1618

1719
{
1820
test-suite algorithm/minmax
1921
: [ run minmax_element_test.cpp unit_test_framework
2022
: : : : minmax_element ]
2123
[ run minmax_test.cpp unit_test_framework
22-
: : : : minmax ]
24+
: : : : minmax ]
2325
;
2426
}
2527

string/doc/Jamfile.v2

+29-29
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,40 @@
1010
import toolset ;
1111
toolset.using doxygen ;
1212

13-
boostbook string_algo : string_algo.xml autodoc
13+
boostbook string_algo : string_algo.xml autodoc
1414
:
1515
<xsl:param>boost.root=../../../../..
1616
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
1717
;
1818

1919
doxygen autodoc
20-
:
21-
[ glob ../../../../boost/algorithm/string.hpp ]
22-
[ glob ../../../../boost/algorithm/string_regex.hpp ]
23-
24-
[ glob ../../../../boost/algorithm/string/classification.hpp ]
25-
[ glob ../../../../boost/algorithm/string/iterator_range.hpp ]
26-
[ glob ../../../../boost/algorithm/string/sequence_traits.hpp ]
27-
[ glob ../../../../boost/algorithm/string/std_containers_traits.hpp ]
28-
[ glob ../../../../boost/algorithm/string/concept.hpp ]
29-
[ glob ../../../../boost/algorithm/string/compare.hpp ]
30-
[ glob ../../../../boost/algorithm/string/constants.hpp ]
31-
[ glob ../../../../boost/algorithm/string/case_conv.hpp ]
32-
[ glob ../../../../boost/algorithm/string/find.hpp ]
33-
[ glob ../../../../boost/algorithm/string/finder.hpp ]
34-
[ glob ../../../../boost/algorithm/string/find_iterator.hpp ]
35-
[ glob ../../../../boost/algorithm/string/trim.hpp ]
36-
[ glob ../../../../boost/algorithm/string/predicate.hpp ]
37-
[ glob ../../../../boost/algorithm/string/split.hpp ]
38-
[ glob ../../../../boost/algorithm/string/iter_find.hpp ]
39-
[ glob ../../../../boost/algorithm/string/erase.hpp ]
40-
[ glob ../../../../boost/algorithm/string/join.hpp ]
41-
[ glob ../../../../boost/algorithm/string/replace.hpp ]
42-
[ glob ../../../../boost/algorithm/string/find_format.hpp ]
43-
[ glob ../../../../boost/algorithm/string/formatter.hpp ]
44-
[ glob ../../../../boost/algorithm/string/regex.hpp ]
45-
[ glob ../../../../boost/algorithm/string/regex_find_format.hpp ]
46-
[ glob ../../../../boost/algorithm/string/trim_all.hpp ]
20+
:
21+
[ glob ../../include/boost/algorithm/string.hpp ]
22+
[ glob ../../include/boost/algorithm/string_regex.hpp ]
23+
24+
[ glob ../../include/boost/algorithm/string/classification.hpp ]
25+
[ glob ../../include/boost/algorithm/string/iterator_range.hpp ]
26+
[ glob ../../include/boost/algorithm/string/sequence_traits.hpp ]
27+
[ glob ../../include/boost/algorithm/string/std_containers_traits.hpp ]
28+
[ glob ../../include/boost/algorithm/string/concept.hpp ]
29+
[ glob ../../include/boost/algorithm/string/compare.hpp ]
30+
[ glob ../../include/boost/algorithm/string/constants.hpp ]
31+
[ glob ../../include/boost/algorithm/string/case_conv.hpp ]
32+
[ glob ../../include/boost/algorithm/string/find.hpp ]
33+
[ glob ../../include/boost/algorithm/string/finder.hpp ]
34+
[ glob ../../include/boost/algorithm/string/find_iterator.hpp ]
35+
[ glob ../../include/boost/algorithm/string/trim.hpp ]
36+
[ glob ../../include/boost/algorithm/string/predicate.hpp ]
37+
[ glob ../../include/boost/algorithm/string/split.hpp ]
38+
[ glob ../../include/boost/algorithm/string/iter_find.hpp ]
39+
[ glob ../../include/boost/algorithm/string/erase.hpp ]
40+
[ glob ../../include/boost/algorithm/string/join.hpp ]
41+
[ glob ../../include/boost/algorithm/string/replace.hpp ]
42+
[ glob ../../include/boost/algorithm/string/find_format.hpp ]
43+
[ glob ../../include/boost/algorithm/string/formatter.hpp ]
44+
[ glob ../../include/boost/algorithm/string/regex.hpp ]
45+
[ glob ../../include/boost/algorithm/string/regex_find_format.hpp ]
46+
[ glob ../../include/boost/algorithm/string/trim_all.hpp ]
4747
:
4848
<doxygen:param>HIDE_UNDOC_MEMBERS=YES
4949
<doxygen:param>EXTRACT_PRIVATE=NO
@@ -53,7 +53,7 @@ doxygen autodoc
5353
<doxygen:param>SEARCH_INCLUDES=YES
5454
<doxygen:param>PREDEFINED="BOOST_STRING_TYPENAME=typename \"BOOST_STATIC_CONSTANT(type,var)=static const type var;\""
5555
;
56-
56+
5757

5858

5959

string/example/Jamfile

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#
88
# See http://www.boost.org for updates, documentation, and revision history.
99

10+
project : requirements <library>/boost/algorithm//boost_algorithm ;
1011

1112
exe conv_example : conv_example.cpp ;
1213
exe predicate_example : predicate_example.cpp ;

string/test/Jamfile.v2

+13-11
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,33 @@
99

1010
import testing ;
1111

12+
project : requirements <library>/boost/algorithm//boost_algorithm ;
13+
1214
alias unit_test_framework
1315
: # sources
14-
/boost//unit_test_framework
15-
;
16+
/boost/test//boost_unit_test_framework
17+
;
1618

1719
test-suite algorithm/string
18-
: [ run
20+
: [ run
1921
trim_test.cpp unit_test_framework
2022
: :
2123
:
2224
: trim
2325
]
24-
[ run
26+
[ run
2527
conv_test.cpp unit_test_framework
2628
: :
2729
:
2830
: conv
2931
]
30-
[ run
32+
[ run
3133
predicate_test.cpp unit_test_framework
3234
: :
3335
:
3436
: predicate
3537
]
36-
[ run
38+
[ run
3739
find_test.cpp unit_test_framework
3840
: :
3941
:
@@ -51,23 +53,23 @@ test-suite algorithm/string
5153
:
5254
: join
5355
]
54-
[ run
56+
[ run
5557
replace_test.cpp unit_test_framework
5658
: :
5759
:
5860
: replace
5961
]
60-
[ run
62+
[ run
6163
regex_test.cpp unit_test_framework
6264
../../../regex/build//boost_regex
6365
: :
64-
:
66+
:
6567
: regex
6668
]
67-
[ run
69+
[ run
6870
find_format_test.cpp unit_test_framework
6971
: :
70-
:
72+
:
7173
: find_format
7274
]
7375
;

test/Jamfile.v2

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99

1010
import testing ;
1111

12+
project : requirements <library>/boost/algorithm//boost_algorithm ;
13+
1214
alias unit_test_framework
1315
: # sources
14-
/boost//unit_test_framework
16+
/boost/test//boost_unit_test_framework
1517
;
1618

1719

@@ -85,7 +87,7 @@ alias unit_test_framework
8587

8688
# Is_partitioned_until tests
8789
[ run is_partitioned_until_test.cpp unit_test_framework : : : : is_partitioned_until_test ]
88-
90+
8991
# Apply_permutation tests
9092
[ run apply_permutation_test.cpp unit_test_framework : : : : apply_permutation_test ]
9193
# Find tests

0 commit comments

Comments
 (0)