From bf3c45927a594d15eef1207d8e8fecd8d478b141 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 5 Sep 2024 00:44:14 -0500 Subject: [PATCH] Have B2 build use same deps as CML for per-target private/public. --- build.jam | 39 +----------------- build/Jamfile.v2 | 100 +++++++++++++++++++++++++++++++++++------------ config/build.jam | 2 +- 3 files changed, 78 insertions(+), 63 deletions(-) diff --git a/build.jam b/build.jam index 0e6525b20..e62a6f68f 100644 --- a/build.jam +++ b/build.jam @@ -5,44 +5,7 @@ require-b2 5.2 ; -constant boost_dependencies : - /boost/assert//boost_assert - /boost/atomic//boost_atomic - /boost/config//boost_config - /boost/core//boost_core - /boost/date_time//boost_date_time - /boost/exception//boost_exception - /boost/filesystem//boost_filesystem - /boost/function_types//boost_function_types - /boost/fusion//boost_fusion - /boost/intrusive//boost_intrusive - /boost/io//boost_io - /boost/iterator//boost_iterator - /boost/move//boost_move - /boost/mpl//boost_mpl - /boost/optional//boost_optional - /boost/parameter//boost_parameter - /boost/phoenix//boost_phoenix - /boost/preprocessor//boost_preprocessor - /boost/property_tree//boost_property_tree - /boost/proto//boost_proto - /boost/range//boost_range - /boost/regex//boost_regex - /boost/smart_ptr//boost_smart_ptr - /boost/spirit//boost_spirit - /boost/system//boost_system - /boost/thread//boost_thread - /boost/throw_exception//boost_throw_exception - /boost/type_index//boost_type_index - /boost/type_traits//boost_type_traits - /boost/utility//boost_utility - /boost/winapi//boost_winapi - /boost/xpressive//boost_xpressive ; - -project /boost/log - : common-requirements - include - ; +project /boost/log ; explicit [ alias boost_log : build//boost_log ] diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 505bdf6e4..de14a8818 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -37,35 +37,88 @@ searched-lib nsl ; searched-lib ipv6 ; explicit rt socket nsl ipv6 ; -local log_cxx_public_requirements = [ requires +constant boost_log_public_deps : + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/date_time//boost_date_time + /boost/filesystem//boost_filesystem + /boost/function_types//boost_function_types + /boost/fusion//boost_fusion + /boost/intrusive//boost_intrusive + /boost/move//boost_move + /boost/mpl//boost_mpl + /boost/parameter//boost_parameter + /boost/phoenix//boost_phoenix + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/proto//boost_proto + /boost/range//boost_range + /boost/smart_ptr//boost_smart_ptr + /boost/system//boost_system + /boost/throw_exception//boost_throw_exception + /boost/type_index//boost_type_index + /boost/type_traits//boost_type_traits + /boost/utility//boost_utility + :/boost/winapi//boost_winapi + [ requires cxx11_static_assert - ] ; + ] + ; -local log_cxx_private_requirements = [ requires +constant boost_log_private_deps : + /boost/align//boost_align + /boost/asio//boost_asio + /boost/bind//boost_bind + /boost/exception//boost_exception + /boost/interprocess//boost_interprocess + /boost/optional//boost_optional + /boost/random//boost_random + /boost/spirit//boost_spirit + [ requires cxx11_lambdas - ] ; + ] + ; -local log_setup_cxx_public_requirements = [ requires +constant boost_log_setup_public_deps : + /boost/assert//boost_assert + /boost/config//boost_config + /boost/core//boost_core + /boost/iterator//boost_iterator + /boost/move//boost_move + /boost/optional//boost_optional + /boost/parameter//boost_parameter + /boost/phoenix//boost_phoenix + /boost/preprocessor//boost_preprocessor + /boost/property_tree//boost_property_tree + /boost/smart_ptr//boost_smart_ptr + /boost/type_traits//boost_type_traits + [ requires cxx11_static_assert cxx11_unified_initialization_syntax - ] ; + ] + ; -local log_setup_cxx_public_requirements = [ requires +constant boost_log_setup_private_deps : + /boost/asio//boost_asio + /boost/bind//boost_bind + /boost/date_time//boost_date_time + /boost/exception//boost_exception + /boost/filesystem//boost_filesystem + /boost/io//boost_io + /boost/spirit//boost_spirit + /boost/throw_exception//boost_throw_exception + /boost/utility//boost_utility + [ requires cxx11_lambdas - ] ; - -constant boost_dependencies_private : - /boost/align//boost_align - /boost/asio//boost_asio - /boost/interprocess//boost_interprocess - /boost/predef//boost_predef - /boost/random//boost_random ; + ] + ; project : source-location ../src - : common-requirements $(boost_dependencies) + : common-requirements + ../include : requirements - $(boost_dependencies_private) @log-arch-config.check-instruction-set @log-build-config.check-atomic-int32 @log-build-config.select-regex-backend @@ -312,14 +365,14 @@ lib boost_log @select-platform-specific-sources shared:BOOST_LOG_DLL BOOST_LOG_BUILDING_THE_LIB=1 - $(log_cxx_public_requirements) - $(log_cxx_private_requirements) + $(boost_log_private_deps) + $(boost_log_public_deps) : ## default-build ## : ## usage-requirements ## shared:BOOST_LOG_DYN_LINK=1 single:BOOST_LOG_NO_THREADS BOOST_LOG_NO_LIB=1 - $(log_cxx_public_requirements) + $(boost_log_public_deps) ; @@ -355,13 +408,12 @@ lib boost_log_setup shared:BOOST_LOG_DYN_LINK=1 shared:BOOST_LOG_SETUP_DLL BOOST_LOG_SETUP_BUILDING_THE_LIB=1 - $(log_setup_cxx_public_requirements) - $(log_setup_cxx_private_requirements) - boost_log + $(boost_log_setup_private_deps) + $(boost_log_setup_public_deps) : ## default-build ## : ## usage-requirements ## shared:BOOST_LOG_SETUP_DYN_LINK=1 single:BOOST_LOG_NO_THREADS BOOST_LOG_SETUP_NO_LIB=1 - $(log_setup_cxx_public_requirements) + $(boost_log_setup_public_deps) ; diff --git a/config/build.jam b/config/build.jam index 116fca8b2..551de845f 100644 --- a/config/build.jam +++ b/config/build.jam @@ -3,7 +3,7 @@ # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) -import-search /boost/predef/tools ; +import-search /boost/predef/tools/check ; import predef ; project