From 7f433b538599fe2c5fbc7266b0b2e55005fd82dc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 01/12] Make the library modular usable. --- build.jam | 34 ++++++++++++++++++++++++ build/Jamfile.v2 | 6 ++--- example/Jamfile.jam | 2 +- test/Jamfile.jam | 64 ++++++++++++++++++++++----------------------- 4 files changed, 69 insertions(+), 37 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 0000000..5d7246c --- /dev/null +++ b/build.jam @@ -0,0 +1,34 @@ +# 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/type_erasure + : common-requirements + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/iterator//boost_iterator + /boost/mp11//boost_mp11 + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/thread//boost_thread + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/vmd//boost_vmd + include + ; + +explicit + [ alias boost_type_erasure : build//boost_type_erasure ] + [ alias all : boost_type_erasure example test ] + ; + +call-if : boost-library type_erasure + : install boost_type_erasure + ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3a77b5e..0ceb3f9 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -6,12 +6,10 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -project /boost/type_erasure +project : source-location ../src : requirements shared:BOOST_TYPE_ERASURE_DYN_LINK : usage-requirements shared:BOOST_TYPE_ERASURE_DYN_LINK ; -lib boost_type_erasure : dynamic_binding.cpp /boost//thread ; - -boost-install boost_type_erasure ; +lib boost_type_erasure : dynamic_binding.cpp /boost/thread//boost_thread ; diff --git a/example/Jamfile.jam b/example/Jamfile.jam index d96922f..9d554c2 100644 --- a/example/Jamfile.jam +++ b/example/Jamfile.jam @@ -21,4 +21,4 @@ compile associated.cpp ; run print_sequence.cpp ; run printf.cpp ; -run multifunction.cpp ; +run multifunction.cpp /boost/variant//boost_variant /boost/phoenix//boost_phoenix ; diff --git a/test/Jamfile.jam b/test/Jamfile.jam index ae030ab..52374cb 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -7,42 +7,42 @@ # http://www.boost.org/LICENSE_1_0.txt) import testing ; -import ../../../libs/config/checks/config ; +import checks/config ; -run test_binding.cpp /boost//unit_test_framework ; -run test_increment.cpp /boost//unit_test_framework ; -run test_add.cpp /boost//unit_test_framework ; -run test_add_assign.cpp /boost//unit_test_framework ; -run test_callable.cpp /boost//unit_test_framework ; -run test_reference.cpp /boost//unit_test_framework ; -run test_construct.cpp /boost//unit_test_framework ; -run test_relaxed.cpp /boost//unit_test_framework ; -run test_assign.cpp /boost//unit_test_framework : : : +run test_binding.cpp /boost/test//unit_test_framework ; +run test_increment.cpp /boost/test//unit_test_framework ; +run test_add.cpp /boost/test//unit_test_framework ; +run test_add_assign.cpp /boost/test//unit_test_framework ; +run test_callable.cpp /boost/test//unit_test_framework ; +run test_reference.cpp /boost/test//unit_test_framework ; +run test_construct.cpp /boost/test//unit_test_framework ; +run test_relaxed.cpp /boost/test//unit_test_framework ; +run test_assign.cpp /boost/test//unit_test_framework : : : gcc,windows:-Wa,-mbig-obj gcc,windows,debug:no ; -run test_construct_ref.cpp /boost//unit_test_framework ; -run test_construct_cref.cpp /boost//unit_test_framework ; -run test_any_cast.cpp /boost//unit_test_framework ; -run test_binding_of.cpp /boost//unit_test_framework ; -run test_typeid_of.cpp /boost//unit_test_framework ; -run test_nested.cpp /boost//unit_test_framework ; -run test_less.cpp /boost//unit_test_framework ; -run test_equal.cpp /boost//unit_test_framework ; -run test_negate.cpp /boost//unit_test_framework ; -run test_dereference.cpp /boost//unit_test_framework ; -run test_subscript.cpp /boost//unit_test_framework ; -run test_forward_iterator.cpp /boost//unit_test_framework ; -run test_tuple.cpp /boost//unit_test_framework ; -run test_stream.cpp /boost//unit_test_framework ; -run test_deduced.cpp /boost//unit_test_framework ; -run test_same_type.cpp /boost//unit_test_framework ; -run test_member.cpp /boost//unit_test_framework ; -run test_null.cpp /boost//unit_test_framework ; -run test_free.cpp /boost//unit_test_framework ; -run test_is_empty.cpp /boost//unit_test_framework ; -run test_dynamic_any_cast.cpp /boost//unit_test_framework /boost//type_erasure ; -run test_limits.cpp /boost//unit_test_framework +run test_construct_ref.cpp /boost/test//unit_test_framework ; +run test_construct_cref.cpp /boost/test//unit_test_framework ; +run test_any_cast.cpp /boost/test//unit_test_framework ; +run test_binding_of.cpp /boost/test//unit_test_framework ; +run test_typeid_of.cpp /boost/test//unit_test_framework ; +run test_nested.cpp /boost/test//unit_test_framework ; +run test_less.cpp /boost/test//unit_test_framework ; +run test_equal.cpp /boost/test//unit_test_framework ; +run test_negate.cpp /boost/test//unit_test_framework ; +run test_dereference.cpp /boost/test//unit_test_framework ; +run test_subscript.cpp /boost/test//unit_test_framework ; +run test_forward_iterator.cpp /boost/test//unit_test_framework ; +run test_tuple.cpp /boost/test//unit_test_framework ; +run test_stream.cpp /boost/test//unit_test_framework ; +run test_deduced.cpp /boost/test//unit_test_framework ; +run test_same_type.cpp /boost/test//unit_test_framework ; +run test_member.cpp /boost/test//unit_test_framework ; +run test_null.cpp /boost/test//unit_test_framework ; +run test_free.cpp /boost/test//unit_test_framework ; +run test_is_empty.cpp /boost/test//unit_test_framework ; +run test_dynamic_any_cast.cpp /boost/test//unit_test_framework /boost/type_erasure//boost_type_erasure ; +run test_limits.cpp /boost/test//unit_test_framework : requirements [ config.requires cxx11_rvalue_references cxx11_template_aliases From bd2a688d9d6053331e5f1debdb2936ee93ce4ed0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:16:00 -0500 Subject: [PATCH 02/12] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/build.jam b/build.jam index 5d7246c..b111f6e 100644 --- a/build.jam +++ b/build.jam @@ -7,20 +7,20 @@ import project ; project /boost/type_erasure : common-requirements - /boost/assert//boost_assert - /boost/config//boost_config - /boost/core//boost_core - /boost/fusion//boost_fusion - /boost/iterator//boost_iterator - /boost/mp11//boost_mp11 - /boost/mpl//boost_mpl - /boost/preprocessor//boost_preprocessor - /boost/smart_ptr//boost_smart_ptr - /boost/thread//boost_thread - /boost/throw_exception//boost_throw_exception - /boost/type_traits//boost_type_traits - /boost/typeof//boost_typeof - /boost/vmd//boost_vmd + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/iterator//boost_iterator + /boost/mp11//boost_mp11 + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/thread//boost_thread + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/vmd//boost_vmd include ; From 35869d3c341a701a9b1d1e2eb54994bfd8b99bfb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Apr 2024 20:17:22 -0500 Subject: [PATCH 03/12] Add missing NO_LIB usage requirements. --- build/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 0ceb3f9..03687ca 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -10,6 +10,7 @@ project : source-location ../src : requirements shared:BOOST_TYPE_ERASURE_DYN_LINK : usage-requirements shared:BOOST_TYPE_ERASURE_DYN_LINK + BOOST_TYPE_ERASURE_NO_LIB=1 ; lib boost_type_erasure : dynamic_binding.cpp /boost/thread//boost_thread ; From a650edb59cae7313b176d5471fb796857524c107 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 04/12] 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 b111f6e..c617761 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/type_erasure From 7b27a782c1cc3e6f4b35d9326662e4c0e5a64db8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 05/12] 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 c617761..d0a1d07 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/type_erasure : common-requirements From 2f94f4ab64152e1f21aa45908a56d44f31ca99d4 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:05 -0500 Subject: [PATCH 06/12] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index d0a1d07..6e901e0 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 8fbaeb56b7036df58dc71fe267bdb6501b466323 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:23 -0500 Subject: [PATCH 07/12] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 31 +++++++++++++++++-------------- build/Jamfile.v2 | 1 + 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/build.jam b/build.jam index 6e901e0..b6bd608 100644 --- a/build.jam +++ b/build.jam @@ -5,22 +5,24 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/fusion//boost_fusion + /boost/iterator//boost_iterator + /boost/mp11//boost_mp11 + /boost/mpl//boost_mpl + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/thread//boost_thread + /boost/throw_exception//boost_throw_exception + /boost/type_traits//boost_type_traits + /boost/typeof//boost_typeof + /boost/vmd//boost_vmd ; + project /boost/type_erasure : common-requirements - /boost/assert//boost_assert - /boost/config//boost_config - /boost/core//boost_core - /boost/fusion//boost_fusion - /boost/iterator//boost_iterator - /boost/mp11//boost_mp11 - /boost/mpl//boost_mpl - /boost/preprocessor//boost_preprocessor - /boost/smart_ptr//boost_smart_ptr - /boost/thread//boost_thread - /boost/throw_exception//boost_throw_exception - /boost/type_traits//boost_type_traits - /boost/typeof//boost_typeof - /boost/vmd//boost_vmd include ; @@ -32,3 +34,4 @@ explicit call-if : boost-library type_erasure : install boost_type_erasure ; + diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 03687ca..3a81a54 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -8,6 +8,7 @@ project : source-location ../src + : common-requirements $(boost_dependencies) : requirements shared:BOOST_TYPE_ERASURE_DYN_LINK : usage-requirements shared:BOOST_TYPE_ERASURE_DYN_LINK BOOST_TYPE_ERASURE_NO_LIB=1 From 80eb9d888059b701e06ff2266057603f2b362ec5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 26 Jul 2024 21:24:11 -0500 Subject: [PATCH 08/12] Split b2 dependencies into public and private. --- build.jam | 1 - build/Jamfile.v2 | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/build.jam b/build.jam index b6bd608..9bf4136 100644 --- a/build.jam +++ b/build.jam @@ -15,7 +15,6 @@ constant boost_dependencies : /boost/mpl//boost_mpl /boost/preprocessor//boost_preprocessor /boost/smart_ptr//boost_smart_ptr - /boost/thread//boost_thread /boost/throw_exception//boost_throw_exception /boost/type_traits//boost_type_traits /boost/typeof//boost_typeof diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3a81a54..d5587f8 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -6,10 +6,15 @@ # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) +constant boost_dependencies_private : + /boost/thread//boost_thread + ; + project : source-location ../src : common-requirements $(boost_dependencies) : requirements shared:BOOST_TYPE_ERASURE_DYN_LINK + $(boost_dependencies_private) : usage-requirements shared:BOOST_TYPE_ERASURE_DYN_LINK BOOST_TYPE_ERASURE_NO_LIB=1 ; From f5f6b7b18056495dc82341034946272234d1a718 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Jul 2024 11:07:54 -0500 Subject: [PATCH 09/12] Adjust doc build to avoid boost-root references. --- doc/Jamfile.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Jamfile.jam b/doc/Jamfile.jam index 2e586b2..b32a299 100644 --- a/doc/Jamfile.jam +++ b/doc/Jamfile.jam @@ -26,7 +26,7 @@ xml type_erasure : type_erasure.qbk : reference ; doxygen reference : - [ glob ../../../boost/type_erasure/*.hpp ] + [ glob ../include/boost/type_erasure/*.hpp ] : EXPAND_ONLY_PREDEF=YES "ALIASES= \\ From 48741510afacb22e56f16a7cdfc3ab670b17472d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 8 Aug 2024 21:45:19 -0500 Subject: [PATCH 10/12] Change Boost Test build refs to work with both old and modular test lib targets. --- test/Jamfile.jam | 62 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 52374cb..85242a2 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -9,40 +9,40 @@ import testing ; import checks/config ; -run test_binding.cpp /boost/test//unit_test_framework ; -run test_increment.cpp /boost/test//unit_test_framework ; -run test_add.cpp /boost/test//unit_test_framework ; -run test_add_assign.cpp /boost/test//unit_test_framework ; -run test_callable.cpp /boost/test//unit_test_framework ; -run test_reference.cpp /boost/test//unit_test_framework ; -run test_construct.cpp /boost/test//unit_test_framework ; -run test_relaxed.cpp /boost/test//unit_test_framework ; -run test_assign.cpp /boost/test//unit_test_framework : : : +run test_binding.cpp /boost/test//boost_unit_test_framework ; +run test_increment.cpp /boost/test//boost_unit_test_framework ; +run test_add.cpp /boost/test//boost_unit_test_framework ; +run test_add_assign.cpp /boost/test//boost_unit_test_framework ; +run test_callable.cpp /boost/test//boost_unit_test_framework ; +run test_reference.cpp /boost/test//boost_unit_test_framework ; +run test_construct.cpp /boost/test//boost_unit_test_framework ; +run test_relaxed.cpp /boost/test//boost_unit_test_framework ; +run test_assign.cpp /boost/test//boost_unit_test_framework : : : gcc,windows:-Wa,-mbig-obj gcc,windows,debug:no ; -run test_construct_ref.cpp /boost/test//unit_test_framework ; -run test_construct_cref.cpp /boost/test//unit_test_framework ; -run test_any_cast.cpp /boost/test//unit_test_framework ; -run test_binding_of.cpp /boost/test//unit_test_framework ; -run test_typeid_of.cpp /boost/test//unit_test_framework ; -run test_nested.cpp /boost/test//unit_test_framework ; -run test_less.cpp /boost/test//unit_test_framework ; -run test_equal.cpp /boost/test//unit_test_framework ; -run test_negate.cpp /boost/test//unit_test_framework ; -run test_dereference.cpp /boost/test//unit_test_framework ; -run test_subscript.cpp /boost/test//unit_test_framework ; -run test_forward_iterator.cpp /boost/test//unit_test_framework ; -run test_tuple.cpp /boost/test//unit_test_framework ; -run test_stream.cpp /boost/test//unit_test_framework ; -run test_deduced.cpp /boost/test//unit_test_framework ; -run test_same_type.cpp /boost/test//unit_test_framework ; -run test_member.cpp /boost/test//unit_test_framework ; -run test_null.cpp /boost/test//unit_test_framework ; -run test_free.cpp /boost/test//unit_test_framework ; -run test_is_empty.cpp /boost/test//unit_test_framework ; -run test_dynamic_any_cast.cpp /boost/test//unit_test_framework /boost/type_erasure//boost_type_erasure ; -run test_limits.cpp /boost/test//unit_test_framework +run test_construct_ref.cpp /boost/test//boost_unit_test_framework ; +run test_construct_cref.cpp /boost/test//boost_unit_test_framework ; +run test_any_cast.cpp /boost/test//boost_unit_test_framework ; +run test_binding_of.cpp /boost/test//boost_unit_test_framework ; +run test_typeid_of.cpp /boost/test//boost_unit_test_framework ; +run test_nested.cpp /boost/test//boost_unit_test_framework ; +run test_less.cpp /boost/test//boost_unit_test_framework ; +run test_equal.cpp /boost/test//boost_unit_test_framework ; +run test_negate.cpp /boost/test//boost_unit_test_framework ; +run test_dereference.cpp /boost/test//boost_unit_test_framework ; +run test_subscript.cpp /boost/test//boost_unit_test_framework ; +run test_forward_iterator.cpp /boost/test//boost_unit_test_framework ; +run test_tuple.cpp /boost/test//boost_unit_test_framework ; +run test_stream.cpp /boost/test//boost_unit_test_framework ; +run test_deduced.cpp /boost/test//boost_unit_test_framework ; +run test_same_type.cpp /boost/test//boost_unit_test_framework ; +run test_member.cpp /boost/test//boost_unit_test_framework ; +run test_null.cpp /boost/test//boost_unit_test_framework ; +run test_free.cpp /boost/test//boost_unit_test_framework ; +run test_is_empty.cpp /boost/test//boost_unit_test_framework ; +run test_dynamic_any_cast.cpp /boost/test//boost_unit_test_framework /boost/type_erasure//boost_type_erasure ; +run test_limits.cpp /boost/test//boost_unit_test_framework : requirements [ config.requires cxx11_rvalue_references cxx11_template_aliases From 7b8a41e0e3277691d58d66cc22ea77ca96e9ccf7 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 9 Aug 2024 22:49:01 -0500 Subject: [PATCH 11/12] Update build deps. --- example/Jamfile.jam | 2 ++ test/Jamfile.jam | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/example/Jamfile.jam b/example/Jamfile.jam index 9d554c2..dcff1f5 100644 --- a/example/Jamfile.jam +++ b/example/Jamfile.jam @@ -8,6 +8,8 @@ import testing ; +project : requirements /boost/type_erasure//boost_type_erasure ; + compile basic.cpp ; compile multi.cpp ; compile convert.cpp ; diff --git a/test/Jamfile.jam b/test/Jamfile.jam index 85242a2..5b76778 100644 --- a/test/Jamfile.jam +++ b/test/Jamfile.jam @@ -7,7 +7,10 @@ # http://www.boost.org/LICENSE_1_0.txt) import testing ; -import checks/config ; +import-search /boost/config/checks ; +import config ; + +project : requirements /boost/type_erasure//boost_type_erasure ; run test_binding.cpp /boost/test//boost_unit_test_framework ; run test_increment.cpp /boost/test//boost_unit_test_framework ; From 493f80c6a2240f5b98afbe8a2e66e0bda3582cdb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 17 Apr 2025 09:18:58 -0500 Subject: [PATCH 12/12] Move include to target. --- build.jam | 2 -- build/Jamfile.v2 | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/build.jam b/build.jam index 9bf4136..00ac297 100644 --- a/build.jam +++ b/build.jam @@ -21,8 +21,6 @@ constant boost_dependencies : /boost/vmd//boost_vmd ; project /boost/type_erasure - : common-requirements - include ; explicit diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index d5587f8..2b7f04c 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -12,7 +12,7 @@ constant boost_dependencies_private : project : source-location ../src - : common-requirements $(boost_dependencies) + : common-requirements ../include $(boost_dependencies) : requirements shared:BOOST_TYPE_ERASURE_DYN_LINK $(boost_dependencies_private) : usage-requirements shared:BOOST_TYPE_ERASURE_DYN_LINK