Skip to content

Commit 95b1ead

Browse files
authored
Merge pull request #57 from grafikrobot/modular
Add support for modular build structure.
2 parents 9238ef8 + e46dd22 commit 95b1ead

File tree

4 files changed

+39
-7
lines changed

4 files changed

+39
-7
lines changed

build.jam

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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/smart_ptr//boost_smart_ptr
13+
/boost/throw_exception//boost_throw_exception
14+
/boost/tuple//boost_tuple
15+
/boost/type_traits//boost_type_traits ;
16+
17+
project /boost/exception
18+
;
19+
20+
explicit
21+
[ alias boost_exception : build//boost_exception ]
22+
[ alias all : boost_exception example test ]
23+
;
24+
25+
call-if : boost-library exception
26+
: install boost_exception
27+
;

build/Jamfile.v2

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
# Distributed under the Boost Software License, Version 1.0. (See accompanying
66
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
77

8-
project boost/exception
8+
project
99
: source-location ../src
10+
: common-requirements <include>../include <library>$(boost_dependencies)
1011
: requirements <link>static
12+
: usage-requirements <define>BOOST_EXCEPTION_NO_LIB=1
1113
;
1214

13-
lib boost_exception : clone_current_exception_non_intrusive.cpp ;
14-
boost-install boost_exception ;
15+
lib boost_exception : clone_current_exception_non_intrusive.cpp : <exception-handling>on ;

example/Jamfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
# Distributed under the Boost Software License, Version 1.0. (See accompanying
66
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
77

8+
project : requirements <library>/boost/exception//boost_exception ;
9+
810
exe example_io : example_io.cpp ;
911
obj error_info_1 : error_info_1.cpp ;
1012
obj error_info_2 : error_info_2.cpp ;
1113
obj cloning_1 : cloning_1.cpp ;
12-
obj cloning_2 : cloning_2.cpp : <threading>multi ;
14+
obj cloning_2 : cloning_2.cpp /boost/thread//boost_thread : <threading>multi ;
1315
obj info_tuple : info_tuple.cpp ;
1416
obj enable_error_info : enable_error_info.cpp ;
1517
obj logging : logging.cpp ;

test/Jamfile.v2

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

88
import testing ;
99

10+
project : requirements <library>/boost/exception//boost_exception ;
11+
1012
#to_string
1113

1214
run is_output_streamable_test.cpp ;
@@ -22,7 +24,7 @@ run 2-throw_exception_no_exceptions_test.cpp : : : <exception-handling>off ;
2224
run 3-throw_exception_no_integration_test.cpp : : : <exception-handling>on ;
2325
run 4-throw_exception_no_both_test.cpp : : : <exception-handling>off ;
2426
run cloning_test.cpp : : : <exception-handling>on ;
25-
run copy_exception_test.cpp ../../thread/src/tss_null.cpp /boost//thread : : : <threading>multi <exception-handling>on ;
27+
run copy_exception_test.cpp ../../thread/src/tss_null.cpp /boost/thread//boost_thread : : : <threading>multi <exception-handling>on ;
2628
run copy_exception_no_exceptions_test.cpp : : : <exception-handling>off <rtti>on ;
2729
run unknown_exception_test.cpp : : : <exception-handling>on ;
2830
run exception_test.cpp : : : <exception-handling>on ;
@@ -39,8 +41,8 @@ run refcount_ptr_test.cpp ;
3941
run current_exception_cast_test.cpp : : : <exception-handling>on ;
4042
run no_exceptions_test.cpp : : : <exception-handling>off ;
4143
run errinfos_test.cpp : : : <exception-handling>on ;
42-
run exception_ptr_test.cpp/<define>BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR ../../thread/src/tss_null.cpp /boost/exception /boost//thread : : : <threading>multi <exception-handling>on : non_intrusive_exception_ptr_test ;
43-
run exception_ptr_test.cpp ../../thread/src/tss_null.cpp /boost//thread : : : <threading>multi <exception-handling>on ;
44+
run exception_ptr_test.cpp/<define>BOOST_ENABLE_NON_INTRUSIVE_EXCEPTION_PTR ../../thread/src/tss_null.cpp /boost/exception//boost_exception /boost/thread//boost_thread : : : <threading>multi <exception-handling>on : non_intrusive_exception_ptr_test ;
45+
run exception_ptr_test.cpp ../../thread/src/tss_null.cpp /boost/thread//boost_thread : : : <threading>multi <exception-handling>on ;
4446
run exception_ptr_test2.cpp ;
4547

4648
lib visibility_test_lib : visibility_test_lib.cpp : <visibility>hidden <exception-handling>on ;

0 commit comments

Comments
 (0)