From 6b1d2fc5ad97044496a43a1d0019f7ba9eca60e6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:27:02 -0500 Subject: [PATCH 01/11] Make the library modular usable. --- Jamfile | 11 ----------- build.jam | 36 ++++++++++++++++++++++++++++++++++++ example/Jamfile.v2 | 3 +-- minmax/test/Jamfile.v2 | 2 +- string/test/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- 6 files changed, 40 insertions(+), 16 deletions(-) delete mode 100644 Jamfile create mode 100644 build.jam diff --git a/Jamfile b/Jamfile deleted file mode 100644 index a2dbf99e6..000000000 --- a/Jamfile +++ /dev/null @@ -1,11 +0,0 @@ -# Boost.Algorithm Library Jamfile -# -# Copyright (c) 2018 James E. King III -# -# Use, modification, and distribution are 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) - -# please order by name to ease maintenance -build-project example ; -build-project test ; diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..f62e633e3 --- /dev/null +++ b/build.jam @@ -0,0 +1,36 @@ +# 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/algorithm + : common-requirements + /boost/array//boost_array + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/exception//boost_exception + /boost/function//boost_function + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/range//boost_range + /boost/regex//boost_regex + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered + include + ; + +explicit + [ alias boost_algorithm ] + [ alias all : boost_algorithm example test string/example string/test ] + ; + +call-if : boost-library algorithm + ; diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 64a405559..96163b68c 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -8,9 +8,8 @@ # See http://www.boost.org for updates, documentation, and revision history. -project /boost/algorithm/example +project : requirements - ../../../ speed msvc:_SCL_SECURE_NO_WARNINGS msvc:NOMINMAX diff --git a/minmax/test/Jamfile.v2 b/minmax/test/Jamfile.v2 index 384b35929..2e41d1ea1 100644 --- a/minmax/test/Jamfile.v2 +++ b/minmax/test/Jamfile.v2 @@ -11,7 +11,7 @@ import testing ; alias unit_test_framework : # sources - /boost//unit_test_framework + /boost/test//unit_test_framework ; { diff --git a/string/test/Jamfile.v2 b/string/test/Jamfile.v2 index 7f60df703..8e53f336c 100644 --- a/string/test/Jamfile.v2 +++ b/string/test/Jamfile.v2 @@ -11,7 +11,7 @@ import testing ; alias unit_test_framework : # sources - /boost//unit_test_framework + /boost/test//unit_test_framework ; test-suite algorithm/string diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index aef6bdb38..9c8d199ae 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -11,7 +11,7 @@ import testing ; alias unit_test_framework : # sources - /boost//unit_test_framework + /boost/test//unit_test_framework ; From fcf95e504bffcadfabb5f4159992a240423dfa5d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:12:36 -0500 Subject: [PATCH 02/11] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/build.jam b/build.jam index f62e633e3..91d63001b 100644 --- a/build.jam +++ b/build.jam @@ -7,23 +7,23 @@ import project ; project /boost/algorithm : common-requirements - /boost/array//boost_array - /boost/assert//boost_assert - /boost/bind//boost_bind - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/core//boost_core - /boost/exception//boost_exception - /boost/function//boost_function - /boost/iterator//boost_iterator - /boost/mpl//boost_mpl - /boost/range//boost_range - /boost/regex//boost_regex - /boost/static_assert//boost_static_assert - /boost/throw_exception//boost_throw_exception - /boost/tuple//boost_tuple - /boost/type_traits//boost_type_traits - /boost/unordered//boost_unordered + /boost/array//boost_array + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/exception//boost_exception + /boost/function//boost_function + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/range//boost_range + /boost/regex//boost_regex + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered include ; From 14922e71c0faa4cda5ca9bfcc5cd7968fcda1b22 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 11:15:55 -0500 Subject: [PATCH 03/11] Avoid global references to boost-root. --- doc/Jamfile.v2 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index bc67f7def..4d3319af0 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -16,18 +16,18 @@ using quickbook ; using doxygen ; using boostbook ; -doxygen autodoc - : - [ glob ../../../boost/algorithm/*.hpp - ../../../boost/algorithm/searching/*.hpp - ../../../boost/algorithm/cxx11/*.hpp - ../../../boost/algorithm/cxx14/*.hpp - ../../../boost/algorithm/cxx17/*.hpp +doxygen autodoc + : + [ glob ../include/boost/algorithm/*.hpp + ../include/boost/algorithm/searching/*.hpp + ../include/boost/algorithm/cxx11/*.hpp + ../include/boost/algorithm/cxx14/*.hpp + ../include/boost/algorithm/cxx17/*.hpp ] - : + : "PREDEFINED=\"BOOST_ALGORITHM_DOXYGEN=1\"" WARNINGS=YES # Default NO, but useful to see warnings, especially in a logfile. - ; + ; xml algorithm : algorithm.qbk ; @@ -36,7 +36,7 @@ boostbook standalone : algorithm : - autodoc + autodoc boost.root=../../../.. "boost.doxygen.reftitle=Boost.Algorithms C++ Reference" chapter.autolabel=0 From b3b2ff4d0ce8fe35bf84cffada5345c8588c2b24 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 13 Apr 2024 16:18:29 -0500 Subject: [PATCH 04/11] Remove relative references to boost-root in Jamfiles. --- string/doc/Jamfile.v2 | 58 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/string/doc/Jamfile.v2 b/string/doc/Jamfile.v2 index 9ddebb8b6..58fc21430 100644 --- a/string/doc/Jamfile.v2 +++ b/string/doc/Jamfile.v2 @@ -10,40 +10,40 @@ import toolset ; toolset.using doxygen ; -boostbook string_algo : string_algo.xml autodoc +boostbook string_algo : string_algo.xml autodoc : boost.root=../../../../.. pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html ; doxygen autodoc - : - [ glob ../../../../boost/algorithm/string.hpp ] - [ glob ../../../../boost/algorithm/string_regex.hpp ] - - [ glob ../../../../boost/algorithm/string/classification.hpp ] - [ glob ../../../../boost/algorithm/string/iterator_range.hpp ] - [ glob ../../../../boost/algorithm/string/sequence_traits.hpp ] - [ glob ../../../../boost/algorithm/string/std_containers_traits.hpp ] - [ glob ../../../../boost/algorithm/string/concept.hpp ] - [ glob ../../../../boost/algorithm/string/compare.hpp ] - [ glob ../../../../boost/algorithm/string/constants.hpp ] - [ glob ../../../../boost/algorithm/string/case_conv.hpp ] - [ glob ../../../../boost/algorithm/string/find.hpp ] - [ glob ../../../../boost/algorithm/string/finder.hpp ] - [ glob ../../../../boost/algorithm/string/find_iterator.hpp ] - [ glob ../../../../boost/algorithm/string/trim.hpp ] - [ glob ../../../../boost/algorithm/string/predicate.hpp ] - [ glob ../../../../boost/algorithm/string/split.hpp ] - [ glob ../../../../boost/algorithm/string/iter_find.hpp ] - [ glob ../../../../boost/algorithm/string/erase.hpp ] - [ glob ../../../../boost/algorithm/string/join.hpp ] - [ glob ../../../../boost/algorithm/string/replace.hpp ] - [ glob ../../../../boost/algorithm/string/find_format.hpp ] - [ glob ../../../../boost/algorithm/string/formatter.hpp ] - [ glob ../../../../boost/algorithm/string/regex.hpp ] - [ glob ../../../../boost/algorithm/string/regex_find_format.hpp ] - [ glob ../../../../boost/algorithm/string/trim_all.hpp ] + : + [ glob ../../include/boost/algorithm/string.hpp ] + [ glob ../../include/boost/algorithm/string_regex.hpp ] + + [ glob ../../include/boost/algorithm/string/classification.hpp ] + [ glob ../../include/boost/algorithm/string/iterator_range.hpp ] + [ glob ../../include/boost/algorithm/string/sequence_traits.hpp ] + [ glob ../../include/boost/algorithm/string/std_containers_traits.hpp ] + [ glob ../../include/boost/algorithm/string/concept.hpp ] + [ glob ../../include/boost/algorithm/string/compare.hpp ] + [ glob ../../include/boost/algorithm/string/constants.hpp ] + [ glob ../../include/boost/algorithm/string/case_conv.hpp ] + [ glob ../../include/boost/algorithm/string/find.hpp ] + [ glob ../../include/boost/algorithm/string/finder.hpp ] + [ glob ../../include/boost/algorithm/string/find_iterator.hpp ] + [ glob ../../include/boost/algorithm/string/trim.hpp ] + [ glob ../../include/boost/algorithm/string/predicate.hpp ] + [ glob ../../include/boost/algorithm/string/split.hpp ] + [ glob ../../include/boost/algorithm/string/iter_find.hpp ] + [ glob ../../include/boost/algorithm/string/erase.hpp ] + [ glob ../../include/boost/algorithm/string/join.hpp ] + [ glob ../../include/boost/algorithm/string/replace.hpp ] + [ glob ../../include/boost/algorithm/string/find_format.hpp ] + [ glob ../../include/boost/algorithm/string/formatter.hpp ] + [ glob ../../include/boost/algorithm/string/regex.hpp ] + [ glob ../../include/boost/algorithm/string/regex_find_format.hpp ] + [ glob ../../include/boost/algorithm/string/trim_all.hpp ] : HIDE_UNDOC_MEMBERS=YES EXTRACT_PRIVATE=NO @@ -53,7 +53,7 @@ doxygen autodoc SEARCH_INCLUDES=YES PREDEFINED="BOOST_STRING_TYPENAME=typename \"BOOST_STATIC_CONSTANT(type,var)=static const type var;\"" ; - + From 1213b9fd1f875ea2752b74844e88e40b3f7828f9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:00 -0500 Subject: [PATCH 05/11] 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 91d63001b..d72c8dda9 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/algorithm From c63c45a932fb1e4fbfea2066b79282d7ff00724e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:55 -0500 Subject: [PATCH 06/11] 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 d72c8dda9..d5b9263dc 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/algorithm : common-requirements From 8189606c93b5bd4d136a9a9d9e6459fbe8b73fee Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 07/11] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index d5b9263dc..e8ae15d6f 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 81e46297b55f37fdf9e6a14a3d125820b4a7a69e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 08/11] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/build.jam b/build.jam index e8ae15d6f..6aac487e3 100644 --- a/build.jam +++ b/build.jam @@ -5,32 +5,35 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/array//boost_array + /boost/assert//boost_assert + /boost/bind//boost_bind + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/core//boost_core + /boost/exception//boost_exception + /boost/function//boost_function + /boost/iterator//boost_iterator + /boost/mpl//boost_mpl + /boost/range//boost_range + /boost/regex//boost_regex + /boost/static_assert//boost_static_assert + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/unordered//boost_unordered ; + project /boost/algorithm : common-requirements - /boost/array//boost_array - /boost/assert//boost_assert - /boost/bind//boost_bind - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/core//boost_core - /boost/exception//boost_exception - /boost/function//boost_function - /boost/iterator//boost_iterator - /boost/mpl//boost_mpl - /boost/range//boost_range - /boost/regex//boost_regex - /boost/static_assert//boost_static_assert - /boost/throw_exception//boost_throw_exception - /boost/tuple//boost_tuple - /boost/type_traits//boost_type_traits - /boost/unordered//boost_unordered include ; explicit - [ alias boost_algorithm ] + [ alias boost_algorithm : : : : $(boost_dependencies) ] [ alias all : boost_algorithm example test string/example string/test ] ; call-if : boost-library algorithm ; + From 0c0e84b112d8e8b57c29bc56bcb9f8b6689c3597 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 27 Jul 2024 10:28:38 -0500 Subject: [PATCH 09/11] Adjust self dependencies as inter-lib deps no longer apply globally. --- build.jam | 7 +++++-- example/Jamfile.v2 | 1 + minmax/example/Jamfile | 2 ++ minmax/test/Jamfile.v2 | 6 ++++-- string/example/Jamfile | 1 + string/test/Jamfile.v2 | 22 ++++++++++++---------- test/Jamfile.v2 | 4 +++- 7 files changed, 28 insertions(+), 15 deletions(-) diff --git a/build.jam b/build.jam index 6aac487e3..49099290d 100644 --- a/build.jam +++ b/build.jam @@ -31,9 +31,12 @@ project /boost/algorithm explicit [ alias boost_algorithm : : : : $(boost_dependencies) ] - [ alias all : boost_algorithm example test string/example string/test ] + [ alias all : boost_algorithm test + example + minmax/example minmax/test + string/example string/test + ] ; call-if : boost-library algorithm ; - diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index 96163b68c..ce3eca301 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -10,6 +10,7 @@ project : requirements + /boost/algorithm//boost_algorithm speed msvc:_SCL_SECURE_NO_WARNINGS msvc:NOMINMAX diff --git a/minmax/example/Jamfile b/minmax/example/Jamfile index d8650e042..56d771de6 100644 --- a/minmax/example/Jamfile +++ b/minmax/example/Jamfile @@ -7,6 +7,8 @@ # http://www.boost.org/LICENSE_1_0.txt) # +project : requirements /boost/algorithm//boost_algorithm ; + exe minmax_ex : minmax_ex.cpp ; exe minmax_timer : minmax_timer.cpp ; diff --git a/minmax/test/Jamfile.v2 b/minmax/test/Jamfile.v2 index 2e41d1ea1..cdc468cb8 100644 --- a/minmax/test/Jamfile.v2 +++ b/minmax/test/Jamfile.v2 @@ -9,17 +9,19 @@ import testing ; +project : requirements /boost/algorithm//boost_algorithm ; + alias unit_test_framework : # sources /boost/test//unit_test_framework - ; + ; { test-suite algorithm/minmax : [ run minmax_element_test.cpp unit_test_framework : : : : minmax_element ] [ run minmax_test.cpp unit_test_framework - : : : : minmax ] + : : : : minmax ] ; } diff --git a/string/example/Jamfile b/string/example/Jamfile index 74c923f8b..4cbe09d3d 100644 --- a/string/example/Jamfile +++ b/string/example/Jamfile @@ -7,6 +7,7 @@ # # See http://www.boost.org for updates, documentation, and revision history. +project : requirements /boost/algorithm//boost_algorithm ; exe conv_example : conv_example.cpp ; exe predicate_example : predicate_example.cpp ; diff --git a/string/test/Jamfile.v2 b/string/test/Jamfile.v2 index 8e53f336c..adbb275d1 100644 --- a/string/test/Jamfile.v2 +++ b/string/test/Jamfile.v2 @@ -9,31 +9,33 @@ import testing ; +project : requirements /boost/algorithm//boost_algorithm ; + alias unit_test_framework : # sources /boost/test//unit_test_framework - ; + ; test-suite algorithm/string - : [ run + : [ run trim_test.cpp unit_test_framework : : : : trim ] - [ run + [ run conv_test.cpp unit_test_framework : : : : conv ] - [ run + [ run predicate_test.cpp unit_test_framework : : : : predicate ] - [ run + [ run find_test.cpp unit_test_framework : : : @@ -51,23 +53,23 @@ test-suite algorithm/string : : join ] - [ run + [ run replace_test.cpp unit_test_framework : : : : replace ] - [ run + [ run regex_test.cpp unit_test_framework ../../../regex/build//boost_regex : : - : + : : regex ] - [ run + [ run find_format_test.cpp unit_test_framework : : - : + : : find_format ] ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9c8d199ae..581abff34 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -9,6 +9,8 @@ import testing ; +project : requirements /boost/algorithm//boost_algorithm ; + alias unit_test_framework : # sources /boost/test//unit_test_framework @@ -85,7 +87,7 @@ alias unit_test_framework # Is_partitioned_until tests [ run is_partitioned_until_test.cpp unit_test_framework : : : : is_partitioned_until_test ] - + # Apply_permutation tests [ run apply_permutation_test.cpp unit_test_framework : : : : apply_permutation_test ] # Find tests From 5c8e6ce9bac34e5597812845a309938c063e91bb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 30 Jul 2024 08:03:47 -0500 Subject: [PATCH 10/11] Add timer dependency for minmax examples. --- minmax/example/Jamfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/minmax/example/Jamfile b/minmax/example/Jamfile index 56d771de6..9aa7e6982 100644 --- a/minmax/example/Jamfile +++ b/minmax/example/Jamfile @@ -7,7 +7,10 @@ # http://www.boost.org/LICENSE_1_0.txt) # -project : requirements /boost/algorithm//boost_algorithm ; +project + : requirements + /boost/algorithm//boost_algorithm + /boost/timer//boost_timer ; exe minmax_ex : minmax_ex.cpp ; exe minmax_timer : minmax_timer.cpp ; From bbfcdf1322b334546cf50b23d083a853b94773b6 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 8 Aug 2024 21:45:19 -0500 Subject: [PATCH 11/11] Change Boost Test build refs to work with both old and modular test lib targets. --- minmax/test/Jamfile.v2 | 2 +- string/test/Jamfile.v2 | 2 +- test/Jamfile.v2 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/minmax/test/Jamfile.v2 b/minmax/test/Jamfile.v2 index cdc468cb8..de74e2c64 100644 --- a/minmax/test/Jamfile.v2 +++ b/minmax/test/Jamfile.v2 @@ -13,7 +13,7 @@ project : requirements /boost/algorithm//boost_algorithm ; alias unit_test_framework : # sources - /boost/test//unit_test_framework + /boost/test//boost_unit_test_framework ; { diff --git a/string/test/Jamfile.v2 b/string/test/Jamfile.v2 index adbb275d1..8c9508504 100644 --- a/string/test/Jamfile.v2 +++ b/string/test/Jamfile.v2 @@ -13,7 +13,7 @@ project : requirements /boost/algorithm//boost_algorithm ; alias unit_test_framework : # sources - /boost/test//unit_test_framework + /boost/test//boost_unit_test_framework ; test-suite algorithm/string diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 581abff34..0c0f93360 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -13,7 +13,7 @@ project : requirements /boost/algorithm//boost_algorithm ; alias unit_test_framework : # sources - /boost/test//unit_test_framework + /boost/test//boost_unit_test_framework ;