Skip to content

Commit f700da0

Browse files
authored
Add support for modular build structure. (#102)
* Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add missing lib reference. * 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.
1 parent 9c6964a commit f700da0

File tree

6 files changed

+56
-28
lines changed

6 files changed

+56
-28
lines changed

Jamfile

Lines changed: 0 additions & 21 deletions
This file was deleted.

benchmark/Jamfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,21 @@
66
# See www.boost.org/LICENSE_1_0.txt
77
#
88

9-
project libs/format/benchmark
9+
project
1010
: requirements
11-
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
12-
;
11+
<library>/boost/format//boost_format
12+
<library>/boost/timer//boost_timer
13+
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
14+
;
1315

1416
exe bench_format_no_locale
1517
: bench_format.cpp
1618
/boost/timer//boost_timer
17-
: <define>BOOST_NO_STD_LOCALE <location-prefix>no_locale
19+
: <define>BOOST_NO_STD_LOCALE <location-prefix>no_locale
1820
;
1921

2022
exe bench_format_normal
21-
: bench_format.cpp
23+
: bench_format.cpp
2224
/boost/timer//boost_timer
2325
: <location-prefix>normal
2426
;

build.jam

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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/core//boost_core
12+
/boost/optional//boost_optional
13+
/boost/smart_ptr//boost_smart_ptr
14+
/boost/throw_exception//boost_throw_exception
15+
/boost/utility//boost_utility ;
16+
17+
project /boost/format
18+
: common-requirements
19+
<include>include
20+
;
21+
22+
explicit
23+
[ alias boost_format : : : : <library>$(boost_dependencies) ]
24+
[ alias all
25+
: boost_format
26+
benchmark
27+
example
28+
test
29+
tools
30+
: <warnings>pedantic
31+
<warnings-as-errors>on
32+
]
33+
;
34+
35+
call-if : boost-library format
36+
;
37+

example/Jamfile.v2

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77

88
import testing ;
99

10+
project : requirements <library>/boost/format//boost_format ;
11+
1012
test-suite "format-examples"
1113
: [ run sample_advanced.cpp ]
1214
[ run sample_formats.cpp ]
1315
[ run sample_new_features.cpp ]
14-
[ run sample_userType.cpp ]
16+
[ run sample_userType.cpp : : : <library>/boost/numeric_conversion//boost_numeric_conversion ]
1517
;
1618

test/Jamfile.v2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88
import testing ;
99

10+
project : requirements
11+
<library>/boost/format//boost_format
12+
<library>/boost/algorithm//boost_algorithm
13+
;
14+
1015
test-suite "format"
1116
: [ run format_test1.cpp ]
1217
[ run format_test1.cpp : : : <toolset>msvc:<cxxflags>"/FIWindows.h" : format_test1_windows_h ]

tools/Jamfile.v2

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@
77

88
project
99
: requirements
10+
<library>/boost/format//boost_format
1011
<define>_CRT_SECURE_NO_WARNINGS
1112
<link>static
1213
;
1314

14-
exe format_matrix
15+
exe format_matrix
1516
: format_matrix.cpp
17+
/boost/array//boost_array
18+
/boost/filesystem//boost_filesystem
1619
/boost/program_options//boost_program_options
1720
/boost/system//boost_system
1821
;

0 commit comments

Comments
 (0)