Skip to content

Commit

Permalink
Merge pull request #140 from grafikrobot/modular
Browse files Browse the repository at this point in the history
Add support for modular build structure.
  • Loading branch information
robertramey authored Aug 18, 2024
2 parents 13ca3d6 + dc8e70a commit c46d7a3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
11 changes: 0 additions & 11 deletions Jamfile.v2

This file was deleted.

28 changes: 28 additions & 0 deletions build.jam
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)

require-b2 5.2 ;

constant boost_dependencies :
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/integer//boost_integer
/boost/logic//boost_logic
/boost/mp11//boost_mp11 ;

project /boost/safe_numerics
: common-requirements
<include>include
;

explicit
[ alias boost_safe_numerics : : : : <library>$(boost_dependencies) ]
[ alias all : boost_safe_numerics example test ]
;

call-if : boost-library safe_numerics
;

4 changes: 3 additions & 1 deletion example/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

import testing ;

project : requirements <library>/boost/safe_numerics//boost_safe_numerics ;

run example1.cpp ;
run example2.cpp ;
run example3.cpp ;
Expand All @@ -24,7 +26,7 @@ run example10.cpp ;
run example11.cpp ;
run example13.cpp ;
run example14.cpp ;
run example15.cpp ;
run example15.cpp : : : <library>/boost/rational//boost_rational ;
run example16.cpp ;
compile-fail example17.cpp ;
run example18.cpp ;
Expand Down
10 changes: 6 additions & 4 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
# http://www.boost.org/LICENSE_1_0.txt

import testing ;
import ../../config/checks/config : requires ;
project
: requirements
import-search /boost/config/checks ;
import config : requires ;
project
: requirements
<library>/boost/safe_numerics//boost_safe_numerics
[ requires cxx14_constexpr ]
# toolset optimizations
<c++-template-depth>256
Expand Down Expand Up @@ -65,7 +67,7 @@ run test_performance.cpp # sources
: <variant>debug:<build>no # requirements
;
run test_range.cpp ;
run test_rational.cpp ;
run test_rational.cpp : : : <library>/boost/rational//boost_rational ;
run test_right_shift_automatic.cpp ;
run test_right_shift_native.cpp ;
run test_safe_compare.cpp ;
Expand Down

0 comments on commit c46d7a3

Please sign in to comment.