From fa58a7d87f47ffcb67c2c2da9a3affd9033f7c7a Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 1/8] Make the library modular usable. --- Jamfile | 38 -------------------------------------- doc/Jamfile | 12 ++++++------ examples/Jamfile | 7 ++++++- test/Jamfile | 10 +++++++--- 4 files changed, 19 insertions(+), 48 deletions(-) delete mode 100644 Jamfile diff --git a/Jamfile b/Jamfile deleted file mode 100644 index de6e5312a..000000000 --- a/Jamfile +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright Mateusz Loskot 2018 -# Copyright Klemens David Morgenstern, Hans P. Dembinski 2016-2017 -# -# Use, modification and distribution is subject to 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) - -# Special builds for Boost Histogram: -# -# Generate coverage data: b2 cxxstd=latest coverage=on test//all -# Test without exceptions and rtti: b2 cxxstd=latest exception-handling=off rtti=off test//minimal -# Test with sanitizers: b2 toolset=clang cxxstd=latest histogram_ubasan test - -import common ; - -project - : requirements - /boost//headers - $(BOOST_ROOT) - clang:"-pedantic -Wextra -Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion -fvisibility=hidden -fvisibility-inlines-hidden" - darwin:"-pedantic -Wextra -Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion -fvisibility=hidden -fvisibility-inlines-hidden" - gcc:"-pedantic -Wextra -Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wfloat-conversion -fvisibility=hidden -fvisibility-inlines-hidden" - msvc:"/bigobj" - intel-win:"/bigobj" - : default-build - all - ; - -path-constant THIS_PATH : . ; - -# only works with clang because of -fsanitize-blacklist -variant histogram_ubasan : debug : - "-fno-omit-frame-pointer -O0 -fno-inline -fsanitize=address,leak,undefined -fno-sanitize-recover=all -fsanitize-blacklist=$(THIS_PATH)/tools/blacklist.supp" - "-fsanitize=address,leak,undefined" - ; - -build-project test ; -build-project examples ; diff --git a/doc/Jamfile b/doc/Jamfile index 261e30835..61087d41b 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -18,12 +18,12 @@ path-constant THIS_PATH : . ; doxygen reference : - $(THIS_PATH)/../../../boost/histogram.hpp - [ glob $(THIS_PATH)/../../../boost/histogram/*.hpp ] - [ glob $(THIS_PATH)/../../../boost/histogram/accumulators/*.hpp ] - [ glob $(THIS_PATH)/../../../boost/histogram/algorithm/*.hpp ] - [ glob $(THIS_PATH)/../../../boost/histogram/axis/*.hpp ] - [ glob $(THIS_PATH)/../../../boost/histogram/utility/*.hpp ] + $(THIS_PATH)/../include/boost/histogram.hpp + [ glob $(THIS_PATH)/../include/boost/histogram/*.hpp ] + [ glob $(THIS_PATH)/../include/boost/histogram/accumulators/*.hpp ] + [ glob $(THIS_PATH)/../include/boost/histogram/algorithm/*.hpp ] + [ glob $(THIS_PATH)/../include/boost/histogram/axis/*.hpp ] + [ glob $(THIS_PATH)/../include/boost/histogram/utility/*.hpp ] : QUIET=YES WARNINGS=YES diff --git a/examples/Jamfile b/examples/Jamfile index e1b85e0e7..ec50d28e1 100644 --- a/examples/Jamfile +++ b/examples/Jamfile @@ -5,8 +5,12 @@ # Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.0.1 ; + +import-search /boost/config/checks ; + import testing ; -import ../../config/checks/config : requires ; +import config : requires ; project : requirements @@ -14,6 +18,7 @@ project cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx11_user_defined_literals # list could go on... ] + /boost/format//boost_format ; alias cxx14 : diff --git a/test/Jamfile b/test/Jamfile index d38b5398b..2a85ee1cb 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -6,11 +6,15 @@ # Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +require-b2 5.0.1 ; + +import-search /boost/config/checks ; + import python ; import os ; import regex ; import testing ; -import ../../config/checks/config : requires ; +import config : requires ; if ! [ python.configured ] { @@ -146,9 +150,9 @@ alias math : [ run utility_jeffreys_interval_test.cpp ] : off ; -alias accumulators : [ run boost_accumulators_support_test.cpp ] : off ; +alias accumulators : [ run boost_accumulators_support_test.cpp : : : /boost/accumulators//boost_accumulators ] : off ; alias range : [ run boost_range_support_test.cpp ] : off ; -alias units : [ run boost_units_support_test.cpp ] : off ; +alias units : [ run boost_units_support_test.cpp : : : /boost/units//boost_units ] : off ; alias serialization : [ run accumulators_serialization_test.cpp libserial : $(THIS_PATH) ] [ run detail_array_wrapper_serialization_test.cpp libserial ] From 5c2aae023cf33aa48a308c6d3a958f5693da8d38 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 25 Apr 2024 08:46:50 -0500 Subject: [PATCH 2/8] Add missing build.jam. --- .gitignore | 3 ++- build.jam | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 build.jam diff --git a/.gitignore b/.gitignore index 922f7f457..08538ab43 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ tools/codecov coverage-report .cache venv -.pytest_cache \ No newline at end of file +.pytest_cache +!*.jam diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..e23d81d64 --- /dev/null +++ b/build.jam @@ -0,0 +1,49 @@ +# Copyright René Ferdinand Rivera Morell 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) + +# Special builds for Boost Histogram: +# +# Generate coverage data: b2 cxxstd=latest coverage=on test//all +# Test without exceptions and rtti: b2 cxxstd=latest exception-handling=off rtti=off test//minimal +# Test with sanitizers: b2 toolset=clang cxxstd=latest histogram_ubasan test + +import project ; + +project /boost/histogram + : common-requirements + /boost/config//boost_config + /boost/core//boost_core + /boost/math//boost_math + /boost/mp11//boost_mp11 + /boost/serialization//boost_serialization + /boost/throw_exception//boost_throw_exception + /boost/variant2//boost_variant2 + include + : requirements + clang:"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion" + darwin:"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion" + gcc:"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wfloat-conversion" + msvc:"/bigobj" + intel-win:"/bigobj" + hidden + : default-build + extra + ; + +explicit + [ alias boost_histogram ] + [ alias all : boost_histogram test examples ] + ; + +call-if : boost-library histogram + ; + +path-constant THIS_PATH : . ; + +# only works with clang because of -fsanitize-blacklist +variant histogram_ubasan : debug : + "-fno-omit-frame-pointer -O0 -fno-inline -fsanitize=address,leak,undefined -fno-sanitize-recover=all -fsanitize-blacklist=$(THIS_PATH)/tools/blacklist.supp" + "-fsanitize=address,leak,undefined" + ; From 6a8ded249912cee5b56a3b67d0a8cabf010a67e0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 3/8] 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 e23d81d64..1bcacb904 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 ; + # Special builds for Boost Histogram: # # Generate coverage data: b2 cxxstd=latest coverage=on test//all From 742c1fc2c2fd30107f22c64448f09cbd6ad73d94 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:55 -0500 Subject: [PATCH 4/8] 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 1bcacb904..858451da3 100644 --- a/build.jam +++ b/build.jam @@ -3,7 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -require-b2 5.1 ; +require-b2 5.2 ; # Special builds for Boost Histogram: # @@ -11,8 +11,6 @@ require-b2 5.1 ; # Test without exceptions and rtti: b2 cxxstd=latest exception-handling=off rtti=off test//minimal # Test with sanitizers: b2 toolset=clang cxxstd=latest histogram_ubasan test -import project ; - project /boost/histogram : common-requirements /boost/config//boost_config From 2e2333388c01e53194bbcf91cc42656bb5e5bdb0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 19:39:41 -0500 Subject: [PATCH 5/8] Change all references to . --- examples/Jamfile | 2 +- test/Jamfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/Jamfile b/examples/Jamfile index ec50d28e1..850fd2a3b 100644 --- a/examples/Jamfile +++ b/examples/Jamfile @@ -18,7 +18,7 @@ project cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx11_user_defined_literals # list could go on... ] - /boost/format//boost_format + /boost/format//boost_format ; alias cxx14 : diff --git a/test/Jamfile b/test/Jamfile index 191c1ea1c..3c510dccb 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -153,9 +153,9 @@ alias math : [ run utility_jeffreys_interval_test.cpp ] : off ; -alias accumulators : [ run boost_accumulators_support_test.cpp : : : /boost/accumulators//boost_accumulators ] : off ; +alias accumulators : [ run boost_accumulators_support_test.cpp : : : /boost/accumulators//boost_accumulators ] : off ; alias range : [ run boost_range_support_test.cpp ] : off ; -alias units : [ run boost_units_support_test.cpp : : : /boost/units//boost_units ] : off ; +alias units : [ run boost_units_support_test.cpp : : : /boost/units//boost_units ] : off ; alias serialization : [ run accumulators_serialization_test.cpp libserial : $(THIS_PATH) ] [ run detail_array_wrapper_serialization_test.cpp libserial ] From 6fd1394623b82885e8f42918190fbd6d22ef7aaf Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:24 -0500 Subject: [PATCH 6/8] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/build.jam b/build.jam index 858451da3..10ee9681b 100644 --- a/build.jam +++ b/build.jam @@ -11,15 +11,17 @@ require-b2 5.2 ; # Test without exceptions and rtti: b2 cxxstd=latest exception-handling=off rtti=off test//minimal # Test with sanitizers: b2 toolset=clang cxxstd=latest histogram_ubasan test +constant boost_dependencies : + /boost/config//boost_config + /boost/core//boost_core + /boost/math//boost_math + /boost/mp11//boost_mp11 + /boost/serialization//boost_serialization + /boost/throw_exception//boost_throw_exception + /boost/variant2//boost_variant2 ; + project /boost/histogram : common-requirements - /boost/config//boost_config - /boost/core//boost_core - /boost/math//boost_math - /boost/mp11//boost_mp11 - /boost/serialization//boost_serialization - /boost/throw_exception//boost_throw_exception - /boost/variant2//boost_variant2 include : requirements clang:"-Wsign-compare -Wstrict-aliasing -fstrict-aliasing -Wvexing-parse -Wfloat-conversion" @@ -33,7 +35,7 @@ project /boost/histogram ; explicit - [ alias boost_histogram ] + [ alias boost_histogram : : : : $(boost_dependencies) ] [ alias all : boost_histogram test examples ] ; @@ -47,3 +49,4 @@ variant histogram_ubasan : debug : "-fno-omit-frame-pointer -O0 -fno-inline -fsanitize=address,leak,undefined -fno-sanitize-recover=all -fsanitize-blacklist=$(THIS_PATH)/tools/blacklist.supp" "-fsanitize=address,leak,undefined" ; + From 0215543a6c097871f998f57ecb5e6ff4e558ba18 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 3 Aug 2024 14:37:10 -0500 Subject: [PATCH 7/8] Update build deps. --- examples/Jamfile | 1 + test/Jamfile | 1 + 2 files changed, 2 insertions(+) diff --git a/examples/Jamfile b/examples/Jamfile index 850fd2a3b..367158c42 100644 --- a/examples/Jamfile +++ b/examples/Jamfile @@ -14,6 +14,7 @@ import config : requires ; project : requirements + /boost/histogram//boost_histogram [ requires cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx11_user_defined_literals # list could go on... diff --git a/test/Jamfile b/test/Jamfile index 3c510dccb..7a01a13f6 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -25,6 +25,7 @@ path-constant THIS_PATH : . ; project : requirements + /boost/histogram//boost_histogram [ requires cxx14_constexpr cxx14_decltype_auto cxx14_generic_lambdas cxx14_return_type_deduction cxx11_user_defined_literals # list could go on... From e159009ad51f2744ef2b7d21b75fcd03cb9d00ff Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 11 Aug 2024 09:23:25 -0500 Subject: [PATCH 8/8] Change math dep real target math/tr1. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 10ee9681b..54f472ab3 100644 --- a/build.jam +++ b/build.jam @@ -14,7 +14,7 @@ require-b2 5.2 ; constant boost_dependencies : /boost/config//boost_config /boost/core//boost_core - /boost/math//boost_math + /boost/math//boost_math_tr1 /boost/mp11//boost_mp11 /boost/serialization//boost_serialization /boost/throw_exception//boost_throw_exception