From 9ca6bab033ded8854b57ec10b2bc75d6fd883ed1 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 1/9] Make the library modular usable. --- Jamfile.v2 | 11 ----------- build.jam | 25 +++++++++++++++++++++++++ example/Jamfile.v2 | 2 +- test/Jamfile.v2 | 4 ++-- 4 files changed, 28 insertions(+), 14 deletions(-) delete mode 100644 Jamfile.v2 create mode 100644 build.jam diff --git a/Jamfile.v2 b/Jamfile.v2 deleted file mode 100644 index 31fb5b0..0000000 --- a/Jamfile.v2 +++ /dev/null @@ -1,11 +0,0 @@ -# Boost.SafeNumerics Library example Jamfile -# -# Copyright (c) 2017 Robert Ramey -# -# 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 - -build-project example ; -build-project test ; -#build-project performance ; diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..032cb39 --- /dev/null +++ b/build.jam @@ -0,0 +1,25 @@ +# Copyright René Ferdinand Rivera Morell 2023 +# 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) + +import project ; + +project /boost/safe_numerics + : common-requirements + /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 + include + ; + +explicit + [ alias boost_safe_numerics ] + [ alias all : boost_safe_numerics example test ] + ; + +call-if : boost-library safe_numerics + ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 848400c..a7772d7 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -24,7 +24,7 @@ run example10.cpp ; run example11.cpp ; run example13.cpp ; run example14.cpp ; -run example15.cpp ; +run example15.cpp : : : /boost/rational//boost_rational ; run example16.cpp ; compile-fail example17.cpp ; run example18.cpp ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index f846a85..18d972f 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -7,7 +7,7 @@ # http://www.boost.org/LICENSE_1_0.txt import testing ; -import ../../config/checks/config : requires ; +import config : requires ; project : requirements [ requires cxx14_constexpr ] @@ -65,7 +65,7 @@ run test_performance.cpp # sources : debug:no # requirements ; run test_range.cpp ; -run test_rational.cpp ; +run test_rational.cpp : : : /boost/rational//boost_rational ; run test_right_shift_automatic.cpp ; run test_right_shift_native.cpp ; run test_safe_compare.cpp ; From 40c1263a7ee6ed8fe11f480e811f651c83e8a816 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 2/9] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build.jam b/build.jam index 032cb39..7720eda 100644 --- a/build.jam +++ b/build.jam @@ -7,12 +7,12 @@ import project ; project /boost/safe_numerics : common-requirements - /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 + /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 include ; From 1faf7c7d5255afd1867f667f84c91a56096a10af Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 4 May 2024 23:32:15 -0500 Subject: [PATCH 3/9] Add missing import-search for cconfig/predef checks. --- test/Jamfile.v2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 18d972f..5d39d9a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -7,9 +7,10 @@ # http://www.boost.org/LICENSE_1_0.txt import testing ; +import-search /boost/config/checks ; import config : requires ; -project - : requirements +project + : requirements [ requires cxx14_constexpr ] # toolset optimizations 256 From 4e7bb5c8b8a220ff7fb398536c18a43446a02e2d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 4/9] Add requires-b2 check to top-level build file. --- build.jam | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.jam b/build.jam index 7720eda..43e7015 100644 --- a/build.jam +++ b/build.jam @@ -3,6 +3,8 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.1 ; + import project ; project /boost/safe_numerics From 2b6dea32b77f9f1de5593ee17ec1c34a6561ec5f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 5/9] Bump B2 require to 5.2 --- build.jam | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.jam b/build.jam index 43e7015..d781ddd 100644 --- a/build.jam +++ b/build.jam @@ -3,9 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; - -import project ; +require-b2 5.2 ; project /boost/safe_numerics : common-requirements From 8e982da288791bce6e3e4e02394de353d95986d6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 19:42:32 -0500 Subject: [PATCH 6/9] Change all references to . --- example/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index a7772d7..26dec94 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -24,7 +24,7 @@ run example10.cpp ; run example11.cpp ; run example13.cpp ; run example14.cpp ; -run example15.cpp : : : /boost/rational//boost_rational ; +run example15.cpp : : : /boost/rational//boost_rational ; run example16.cpp ; compile-fail example17.cpp ; run example18.cpp ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 5d39d9a..8535c6d 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -66,7 +66,7 @@ run test_performance.cpp # sources : debug:no # requirements ; run test_range.cpp ; -run test_rational.cpp : : : /boost/rational//boost_rational ; +run test_rational.cpp : : : /boost/rational//boost_rational ; run test_right_shift_automatic.cpp ; run test_right_shift_native.cpp ; run test_safe_compare.cpp ; From 63c98aa451a967d626b0f28ce339618fcf5df6ad Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:05 -0500 Subject: [PATCH 7/9] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index d781ddd..c0eb919 100644 --- a/build.jam +++ b/build.jam @@ -1,4 +1,4 @@ -# Copyright René Ferdinand Rivera Morell 2023 +# 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) From 79b7991928d7bfc8964026810e26bafe4f846158 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:24 -0500 Subject: [PATCH 8/9] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/build.jam b/build.jam index c0eb919..e483560 100644 --- a/build.jam +++ b/build.jam @@ -5,21 +5,24 @@ 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 - /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 include ; explicit - [ alias boost_safe_numerics ] + [ alias boost_safe_numerics : : : : $(boost_dependencies) ] [ alias all : boost_safe_numerics example test ] ; call-if : boost-library safe_numerics ; + From dc8e70a1907c73fefd30cf7a89e74079feafedf4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 7 Aug 2024 23:48:42 -0500 Subject: [PATCH 9/9] Update build deps. --- example/Jamfile.v2 | 2 ++ test/Jamfile.v2 | 1 + 2 files changed, 3 insertions(+) diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 26dec94..04ba235 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -8,6 +8,8 @@ import testing ; +project : requirements /boost/safe_numerics//boost_safe_numerics ; + run example1.cpp ; run example2.cpp ; run example3.cpp ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 8535c6d..8776967 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -11,6 +11,7 @@ import-search /boost/config/checks ; import config : requires ; project : requirements + /boost/safe_numerics//boost_safe_numerics [ requires cxx14_constexpr ] # toolset optimizations 256