Skip to content

Commit bc85d86

Browse files
authored
Add support for modular build structure. (#21)
* Make the library modular usable. * Switch to library requirements instead of source. As source puts extra source in install targets. * Add missing import-search for cconfig/predef checks. * Add requires-b2 check to top-level build file. * Update dependencies. * Bump B2 require to 5.2 * Remove repeated import-search. * Move inter-lib dependencies to a project variable and into the build targets. * Adjust doc build to avoid boost-root references. * Update build deps.
1 parent db963ea commit bc85d86

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

build.jam

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright René Ferdinand Rivera Morell 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/type_traits//boost_type_traits ;
13+
14+
project /boost/scope
15+
: common-requirements
16+
<include>include
17+
;
18+
19+
explicit
20+
[ alias boost_scope : : : : <library>$(boost_dependencies) ]
21+
[ alias all : boost_scope test ]
22+
;
23+
24+
call-if : boost-library scope
25+
;
26+

doc/Jamfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ local doxygen_params =
5656

5757
local top_level_includes =
5858
[ glob
59-
../../../boost/scope/*.hpp
59+
../include/boost/scope/*.hpp
6060
] ;
6161

6262

test/Jamfile

+8-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,18 @@
44
# (See accompanying file LICENSE_1_0.txt or copy at
55
# https://www.boost.org/LICENSE_1_0.txt)
66

7+
require-b2 5.0.1 ;
8+
79
import testing ;
810
import path ;
911
import regex ;
1012
import os ;
11-
import ../../config/checks/config : requires ;
13+
import-search /boost/config/checks ;
14+
import config : requires ;
1215

1316
project
1417
: requirements
18+
<library>/boost/scope//boost_scope
1519
<include>common
1620

1721
<c++-template-depth>1024
@@ -43,6 +47,8 @@ project
4347
<target-os>windows:<define>_CRT_SECURE_NO_DEPRECATE
4448
;
4549

50+
path-constant SCOPE_INCLUDE_DIR : ../include ;
51+
4652
# this rule enumerates through all the sources and invokes
4753
# the run rule for each source, the result is a list of all
4854
# the run rules, which we can pass on to the test_suite rule:
@@ -53,7 +59,7 @@ rule test_all
5359

5460
if ! [ os.environ BOOST_SCOPE_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
5561
{
56-
local headers_path = [ path.make $(BOOST_ROOT)/libs/scope/include/boost/scope ] ;
62+
local headers_path = [ path.make $(SCOPE_INCLUDE_DIR)/boost/scope ] ;
5763
for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
5864
{
5965
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;

0 commit comments

Comments
 (0)