Skip to content

Commit

Permalink
Have B2 build use same deps as CML for per-target private/public.
Browse files Browse the repository at this point in the history
  • Loading branch information
grafikrobot committed Sep 5, 2024
1 parent 0d1a2b3 commit bf3c459
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 63 deletions.
39 changes: 1 addition & 38 deletions build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -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>include
;
project /boost/log ;

explicit
[ alias boost_log : build//boost_log ]
Expand Down
100 changes: 76 additions & 24 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
<library>/boost/assert//boost_assert
<library>/boost/config//boost_config
<library>/boost/core//boost_core
<library>/boost/date_time//boost_date_time
<library>/boost/filesystem//boost_filesystem
<library>/boost/function_types//boost_function_types
<library>/boost/fusion//boost_fusion
<library>/boost/intrusive//boost_intrusive
<library>/boost/move//boost_move
<library>/boost/mpl//boost_mpl
<library>/boost/parameter//boost_parameter
<library>/boost/phoenix//boost_phoenix
<library>/boost/predef//boost_predef
<library>/boost/preprocessor//boost_preprocessor
<library>/boost/proto//boost_proto
<library>/boost/range//boost_range
<library>/boost/smart_ptr//boost_smart_ptr
<library>/boost/system//boost_system
<library>/boost/throw_exception//boost_throw_exception
<library>/boost/type_index//boost_type_index
<library>/boost/type_traits//boost_type_traits
<library>/boost/utility//boost_utility
<target-os>:<library>/boost/winapi//boost_winapi
[ requires
cxx11_static_assert
] ;
]
;

local log_cxx_private_requirements = [ requires
constant boost_log_private_deps :
<library>/boost/align//boost_align
<library>/boost/asio//boost_asio
<library>/boost/bind//boost_bind
<library>/boost/exception//boost_exception
<library>/boost/interprocess//boost_interprocess
<library>/boost/optional//boost_optional
<library>/boost/random//boost_random
<library>/boost/spirit//boost_spirit
[ requires
cxx11_lambdas
] ;
]
;

local log_setup_cxx_public_requirements = [ requires
constant boost_log_setup_public_deps :
<library>/boost/assert//boost_assert
<library>/boost/config//boost_config
<library>/boost/core//boost_core
<library>/boost/iterator//boost_iterator
<library>/boost/move//boost_move
<library>/boost/optional//boost_optional
<library>/boost/parameter//boost_parameter
<library>/boost/phoenix//boost_phoenix
<library>/boost/preprocessor//boost_preprocessor
<library>/boost/property_tree//boost_property_tree
<library>/boost/smart_ptr//boost_smart_ptr
<library>/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 :
<library>/boost/asio//boost_asio
<library>/boost/bind//boost_bind
<library>/boost/date_time//boost_date_time
<library>/boost/exception//boost_exception
<library>/boost/filesystem//boost_filesystem
<library>/boost/io//boost_io
<library>/boost/spirit//boost_spirit
<library>/boost/throw_exception//boost_throw_exception
<library>/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 <library>$(boost_dependencies)
: common-requirements
<include>../include
: requirements
<library>$(boost_dependencies_private)
<conditional>@log-arch-config.check-instruction-set
<conditional>@log-build-config.check-atomic-int32
<conditional>@log-build-config.select-regex-backend
Expand Down Expand Up @@ -312,14 +365,14 @@ lib boost_log
<conditional>@select-platform-specific-sources
<link>shared:<define>BOOST_LOG_DLL
<define>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 ##
<link>shared:<define>BOOST_LOG_DYN_LINK=1
<threading>single:<define>BOOST_LOG_NO_THREADS
<define>BOOST_LOG_NO_LIB=1
$(log_cxx_public_requirements)
$(boost_log_public_deps)
;


Expand Down Expand Up @@ -355,13 +408,12 @@ lib boost_log_setup
<link>shared:<define>BOOST_LOG_DYN_LINK=1
<link>shared:<define>BOOST_LOG_SETUP_DLL
<define>BOOST_LOG_SETUP_BUILDING_THE_LIB=1
$(log_setup_cxx_public_requirements)
$(log_setup_cxx_private_requirements)
<library>boost_log
$(boost_log_setup_private_deps)
$(boost_log_setup_public_deps)
: ## default-build ##
: ## usage-requirements ##
<link>shared:<define>BOOST_LOG_SETUP_DYN_LINK=1
<threading>single:<define>BOOST_LOG_NO_THREADS
<define>BOOST_LOG_SETUP_NO_LIB=1
$(log_setup_cxx_public_requirements)
$(boost_log_setup_public_deps)
;
2 changes: 1 addition & 1 deletion config/build.jam
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bf3c459

Please sign in to comment.