From e2de5713599cfdc6090327a507ec093280ec8a65 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:17 -0500 Subject: [PATCH 01/11] Make the library modular usable. --- build.jam | 49 ++++++++++++++++++++++++++++++++++++++++++++++ build/Jamfile.v2 | 17 ++++++++++------ example/Jamfile.v2 | 2 +- test/Jamfile.v2 | 5 ++--- 4 files changed, 63 insertions(+), 10 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..9844c0d25 --- /dev/null +++ b/build.jam @@ -0,0 +1,49 @@ +# 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/thread + : common-requirements + /boost/algorithm//boost_algorithm + /boost/assert//boost_assert + /boost/atomic//boost_atomic + /boost/bind//boost_bind + /boost/chrono//boost_chrono + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/container//boost_container + /boost/container_hash//boost_container_hash + /boost/core//boost_core + /boost/date_time//boost_date_time + /boost/exception//boost_exception + /boost/function//boost_function + /boost/intrusive//boost_intrusive + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/lexical_cast//boost_lexical_cast + /boost/move//boost_move + /boost/optional//boost_optional + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/static_assert//boost_static_assert + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + /boost/winapi//boost_winapi + include + ; + +explicit + [ alias boost_thread : build//boost_thread ] + [ alias all : boost_thread example test ] + ; + +call-if : boost-library thread + : install boost_thread + ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 1a88d0102..9ef96f5c7 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -40,14 +40,14 @@ import threadapi-feature ; exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ; -project boost/thread +project : source-location ../src : requirements multi #static:BOOST_THREAD_STATIC_LINK=1 #shared:BOOST_THREAD_DYN_LINK=1 static:BOOST_THREAD_BUILD_LIB=1 shared:BOOST_THREAD_BUILD_DLL=1 - -@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag + -@%boostcpp.tag @$(__name__).tag gcc:-Wno-long-long #BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED @@ -156,8 +156,15 @@ rule tag ( name : type ? : property-set ) } # forward to the boost tagging rule - return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag - $(result) : $(type) : $(property-set) ] ; + if $(BOOST_JAMROOT_MODULE) + { + return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag + $(result) : $(type) : $(property-set) ] ; + } + else + { + return $(result) ; + } } rule win32_pthread_paths ( properties * ) @@ -315,5 +322,3 @@ lib boost_thread static:BOOST_THREAD_USE_LIB=1 @usage-requirements ; - -boost-install boost_thread ; \ No newline at end of file diff --git a/example/Jamfile.v2 b/example/Jamfile.v2 index bfc8a59b3..fbdf760c5 100644 --- a/example/Jamfile.v2 +++ b/example/Jamfile.v2 @@ -4,7 +4,7 @@ # 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) -project boost/thread/example +project : requirements ../build//boost_thread multi ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3f81bc07e..9926be5ec 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -268,10 +268,9 @@ rule generate_self_contained_header_tests if ! [ os.environ BOOST_THREAD_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ] { - local headers_path = [ path.make $(BOOST_ROOT)/libs/thread/include/boost/thread ] ; - for file in [ path.glob-tree $(headers_path) : *.hpp : detail pthread win32 ] + for file in [ glob-tree-ex ../include/boost/thread : *.hpp : detail pthread win32 ] { - local rel_file = [ path.relative-to $(headers_path) $(file) ] ; + local rel_file = [ path.relative-to ../include/boost/thread $(file) ] ; # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end. # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes. local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ; From 691b64d5aa9bf61306deb64017582e5130b7daeb Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 17 Mar 2024 18:34:13 -0500 Subject: [PATCH 02/11] Put back removing qualified boostcpp tag. As we need it until the Jamroot removes the qualified tag. --- build/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 9ef96f5c7..148436688 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -48,6 +48,7 @@ project static:BOOST_THREAD_BUILD_LIB=1 shared:BOOST_THREAD_BUILD_DLL=1 -@%boostcpp.tag + -@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag @$(__name__).tag gcc:-Wno-long-long #BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED From 43bfe9cbd2c50c01c5a7b8f464a6e40a240b7d23 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:16:00 -0500 Subject: [PATCH 03/11] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 58 +++++++++++++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/build.jam b/build.jam index 9844c0d25..56cae078e 100644 --- a/build.jam +++ b/build.jam @@ -7,35 +7,35 @@ import project ; project /boost/thread : common-requirements - /boost/algorithm//boost_algorithm - /boost/assert//boost_assert - /boost/atomic//boost_atomic - /boost/bind//boost_bind - /boost/chrono//boost_chrono - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/container//boost_container - /boost/container_hash//boost_container_hash - /boost/core//boost_core - /boost/date_time//boost_date_time - /boost/exception//boost_exception - /boost/function//boost_function - /boost/intrusive//boost_intrusive - /boost/io//boost_io - /boost/iterator//boost_iterator - /boost/lexical_cast//boost_lexical_cast - /boost/move//boost_move - /boost/optional//boost_optional - /boost/predef//boost_predef - /boost/preprocessor//boost_preprocessor - /boost/smart_ptr//boost_smart_ptr - /boost/static_assert//boost_static_assert - /boost/system//boost_system - /boost/throw_exception//boost_throw_exception - /boost/tuple//boost_tuple - /boost/type_traits//boost_type_traits - /boost/utility//boost_utility - /boost/winapi//boost_winapi + /boost/algorithm//boost_algorithm + /boost/assert//boost_assert + /boost/atomic//boost_atomic + /boost/bind//boost_bind + /boost/chrono//boost_chrono + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/container//boost_container + /boost/container_hash//boost_container_hash + /boost/core//boost_core + /boost/date_time//boost_date_time + /boost/exception//boost_exception + /boost/function//boost_function + /boost/intrusive//boost_intrusive + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/lexical_cast//boost_lexical_cast + /boost/move//boost_move + /boost/optional//boost_optional + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/static_assert//boost_static_assert + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + /boost/winapi//boost_winapi include ; From ca4b54f96cfbcaea62f6bca0fa031a95632ac784 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Apr 2024 20:17:11 -0500 Subject: [PATCH 04/11] Add missing NO_LIB usage requirements. --- build/Jamfile.v2 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 148436688..19fb4745a 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -35,7 +35,7 @@ import os ; import indirect ; import path ; -import configure ; +import configure ; import threadapi-feature ; exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ; @@ -140,6 +140,7 @@ project #BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED #BOOST_SYSTEM_NO_DEPRECATED #BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS + BOOST_THREAD_NO_LIB=1 ; rule tag ( name : type ? : property-set ) @@ -277,10 +278,10 @@ rule requirements ( properties * ) } } result += BOOST_THREAD_DONT_USE_CHRONO ; - if ! [ configure.builds has_atomic_flag_lockfree - : $(properties) : "lockfree boost::atomic_flag" ] { - result += /boost/atomic//boost_atomic ; - } + if ! [ configure.builds has_atomic_flag_lockfree + : $(properties) : "lockfree boost::atomic_flag" ] { + result += /boost/atomic//boost_atomic ; + } } else { if win32 in $(properties) { From 435a623e48d0d5b63b64356289ca4ab48dddfd1b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -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 56cae078e..a86a032bd 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/thread From 0fc00ec05c0cf739498a7515372e62d86199e060 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 13 May 2024 21:47:48 -0500 Subject: [PATCH 06/11] Update dependencies. --- build.jam | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.jam b/build.jam index a86a032bd..7bf715983 100644 --- a/build.jam +++ b/build.jam @@ -9,7 +9,6 @@ import project ; project /boost/thread : common-requirements - /boost/algorithm//boost_algorithm /boost/assert//boost_assert /boost/atomic//boost_atomic /boost/bind//boost_bind @@ -22,10 +21,7 @@ project /boost/thread /boost/date_time//boost_date_time /boost/exception//boost_exception /boost/function//boost_function - /boost/intrusive//boost_intrusive /boost/io//boost_io - /boost/iterator//boost_iterator - /boost/lexical_cast//boost_lexical_cast /boost/move//boost_move /boost/optional//boost_optional /boost/predef//boost_predef From e6e4e53807e834a9d120aba8131c1686ea32582f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 07/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 7bf715983..5494ea555 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/thread : common-requirements From b1ff784e5128d22698d5b1203f6db49d5f8182f0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 08/11] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 5494ea555..6f6a6be1b 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 82aa252a9ee96ff961b6d136be1ffe6e54557bd0 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 09/11] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 53 +++++++++++++++++++++++++----------------------- build/Jamfile.v2 | 1 + 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/build.jam b/build.jam index 6f6a6be1b..f42443c0e 100644 --- a/build.jam +++ b/build.jam @@ -5,33 +5,35 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/assert//boost_assert + /boost/atomic//boost_atomic + /boost/bind//boost_bind + /boost/chrono//boost_chrono + /boost/concept_check//boost_concept_check + /boost/config//boost_config + /boost/container//boost_container + /boost/container_hash//boost_container_hash + /boost/core//boost_core + /boost/date_time//boost_date_time + /boost/exception//boost_exception + /boost/function//boost_function + /boost/io//boost_io + /boost/move//boost_move + /boost/optional//boost_optional + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/smart_ptr//boost_smart_ptr + /boost/static_assert//boost_static_assert + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/tuple//boost_tuple + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + /boost/winapi//boost_winapi ; + project /boost/thread : common-requirements - /boost/assert//boost_assert - /boost/atomic//boost_atomic - /boost/bind//boost_bind - /boost/chrono//boost_chrono - /boost/concept_check//boost_concept_check - /boost/config//boost_config - /boost/container//boost_container - /boost/container_hash//boost_container_hash - /boost/core//boost_core - /boost/date_time//boost_date_time - /boost/exception//boost_exception - /boost/function//boost_function - /boost/io//boost_io - /boost/move//boost_move - /boost/optional//boost_optional - /boost/predef//boost_predef - /boost/preprocessor//boost_preprocessor - /boost/smart_ptr//boost_smart_ptr - /boost/static_assert//boost_static_assert - /boost/system//boost_system - /boost/throw_exception//boost_throw_exception - /boost/tuple//boost_tuple - /boost/type_traits//boost_type_traits - /boost/utility//boost_utility - /boost/winapi//boost_winapi include ; @@ -43,3 +45,4 @@ explicit call-if : boost-library thread : install boost_thread ; + diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 19fb4745a..2ec45b8e4 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -42,6 +42,7 @@ exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ; project : source-location ../src + : common-requirements $(boost_dependencies) : requirements multi #static:BOOST_THREAD_STATIC_LINK=1 #shared:BOOST_THREAD_DYN_LINK=1 From 814ed9f34168043d5780748d44e90bdfac696ccc Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 9 Aug 2024 22:26:06 -0500 Subject: [PATCH 10/11] Update build deps. --- test/Jamfile.v2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9926be5ec..340f6c0aa 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -275,8 +275,8 @@ rule generate_self_contained_header_tests # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes. local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ; #ECHO $(rel_file) ; - all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" $(file) : $(test_name) ] ; - all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" "BOOST_THREAD_TEST_POST_WINDOWS_H" $(file) @windows-cygwin-specific : $(test_name)-post_winh ] ; + all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" $(file) ../build//boost_thread : $(test_name) ] ; + all_rules += [ compile self_contained_header.cpp : "BOOST_THREAD_TEST_HEADER=$(rel_file)" "BOOST_THREAD_TEST_POST_WINDOWS_H" $(file) @windows-cygwin-specific ../build//boost_thread : $(test_name)-post_winh ] ; } } @@ -1011,7 +1011,7 @@ rule generate_self_contained_header_tests #[ thread-run test_10128.cpp ] #[ thread-run test_10340.cpp ] ; - + explicit ts_more_cpp11 ; test-suite ts_more_cpp11 : @@ -1032,13 +1032,13 @@ rule generate_self_contained_header_tests : [ thread-run2-noit ./experimental/parallel/v1/exception_list_pass.cpp : exception_list_p ] ; - + #explicit ts_task_region ; test-suite ts_task_region : [ thread-run2-noit ./experimental/parallel/v2/task_region_pass.cpp : task_region_p ] ; - + explicit ts_other ; test-suite ts_other : @@ -1049,7 +1049,7 @@ rule generate_self_contained_header_tests explicit ts_ ; test-suite ts_ : - #[ thread-run test_11256.cpp ] + #[ thread-run test_11256.cpp ] #[ thread-run test_11256.cpp ] #[ thread-run test_11499.cpp ] #[ thread-run test_11611.cpp ] @@ -1059,7 +1059,7 @@ rule generate_self_contained_header_tests #[ thread-run test_12949.cpp ] #[ thread-run test_13480b.cpp ] [ thread-run test_13561.cpp ] - + ; explicit test_time_jumps_1_obj ; From 28d58852bb8b638dc3e82fe06002e06312f4ea83 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 14 Apr 2025 20:26:31 -0500 Subject: [PATCH 11/11] Move the include usage req to the library build target. --- build.jam | 2 -- build/Jamfile.v2 | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.jam b/build.jam index f42443c0e..d0caf573d 100644 --- a/build.jam +++ b/build.jam @@ -33,8 +33,6 @@ constant boost_dependencies : /boost/winapi//boost_winapi ; project /boost/thread - : common-requirements - include ; explicit diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 2ec45b8e4..5be59046a 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -42,7 +42,9 @@ exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ; project : source-location ../src - : common-requirements $(boost_dependencies) + : common-requirements + $(boost_dependencies) + ../include : requirements multi #static:BOOST_THREAD_STATIC_LINK=1 #shared:BOOST_THREAD_DYN_LINK=1