From b15ac8d3667e0c1d633cece8f5103bf1cd4fd630 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 11 Mar 2024 08:38:16 -0500 Subject: [PATCH 01/22] Make the library modular usable. --- build.jam | 63 ++++++++++++++++++++++++++++++++++++ build/Jamfile.v2 | 22 ++++++------- example/doc/Jamfile.v2 | 2 ++ example/wide_char/Jamfile.v2 | 2 +- test/Jamfile.v2 | 5 ++- 5 files changed, 78 insertions(+), 16 deletions(-) create mode 100644 build.jam diff --git a/build.jam b/build.jam new file mode 100644 index 000000000..1d3438ab7 --- /dev/null +++ b/build.jam @@ -0,0 +1,63 @@ +# 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/log + : common-requirements + /boost/align//boost_align + /boost/array//boost_array + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/atomic//boost_atomic + /boost/bind//boost_bind + /boost/config//boost_config + /boost/container//boost_container + /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/interprocess//boost_interprocess + /boost/intrusive//boost_intrusive + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/lexical_cast//boost_lexical_cast + /boost/move//boost_move + /boost/mpl//boost_mpl + /boost/optional//boost_optional + /boost/parameter//boost_parameter + /boost/phoenix//boost_phoenix + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/property_tree//boost_property_tree + /boost/proto//boost_proto + /boost/random//boost_random + /boost/range//boost_range + /boost/regex//boost_regex + /boost/smart_ptr//boost_smart_ptr + /boost/spirit//boost_spirit + /boost/static_assert//boost_static_assert + /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 + include + ; + +explicit + [ alias boost_log : build//boost_log ] + [ alias boost_log_setup : build//boost_log_setup ] + [ alias all : boost_log boost_log_setup example test ] + ; + +call-if : boost-library log + : install boost_log boost_log_setup + ; diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 4657fdfb1..71abfb9fc 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -26,18 +26,18 @@ project.load [ path.join [ path.make $(here:D) ] ../config/x86-ext ] ; project.pop-current ; # Windows libs -lib psapi ; -lib advapi32 ; -lib secur32 ; -lib ws2_32 ; -lib mswsock ; +searched-lib psapi ; +searched-lib advapi32 ; +searched-lib secur32 ; +searched-lib ws2_32 ; +searched-lib mswsock ; explicit psapi advapi32 secur32 ws2_32 mswsock ; # UNIX libs -lib rt ; -lib socket ; -lib nsl ; -lib ipv6 ; +searched-lib rt ; +searched-lib socket ; +searched-lib nsl ; +searched-lib ipv6 ; explicit rt socket nsl ipv6 ; local log_cxx_public_requirements = [ requires @@ -57,7 +57,7 @@ local log_setup_cxx_public_requirements = [ requires cxx11_lambdas ] ; -project boost/log +project : source-location ../src : requirements @log-arch-config.check-instruction-set @@ -349,5 +349,3 @@ lib boost_log_setup single:BOOST_LOG_NO_THREADS $(log_setup_cxx_public_requirements) ; - -boost-install boost_log boost_log_setup ; diff --git a/example/doc/Jamfile.v2 b/example/doc/Jamfile.v2 index 1a1fe4059..769a11655 100644 --- a/example/doc/Jamfile.v2 +++ b/example/doc/Jamfile.v2 @@ -89,6 +89,8 @@ project /boost/date_time//boost_date_time /boost/filesystem//boost_filesystem /boost/thread//boost_thread + /boost/lambda//boost_lambda + /boost/scope_exit//boost_scope_exit multi ; diff --git a/example/wide_char/Jamfile.v2 b/example/wide_char/Jamfile.v2 index dab6836fe..dc29cba62 100644 --- a/example/wide_char/Jamfile.v2 +++ b/example/wide_char/Jamfile.v2 @@ -42,7 +42,7 @@ project /boost/log//boost_log_setup /boost/date_time//boost_date_time /boost/filesystem//boost_filesystem - /boost/locale//boost_locale + /boost/locale//boost_locale/static /boost/thread//boost_thread multi diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 34a8324fb..33485c02e 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -72,10 +72,9 @@ rule test_all if ! [ os.environ BOOST_LOG_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ] { - local headers_path = [ path.make $(BOOST_ROOT)/libs/log/include/boost/log ] ; - for file in [ path.glob-tree $(headers_path) : *.hpp : detail ] + for file in [ glob-tree-ex ../include/boost/log : *.hpp : detail ] { - local rel_file = [ path.relative-to $(headers_path) $(file) ] ; + local rel_file = [ path.relative-to ../include/boost/log $(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 99ff55cb293e02d3fc4a4962e1e689cb6582c4e5 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 29 Mar 2024 21:15:59 -0500 Subject: [PATCH 02/22] Switch to library requirements instead of source. As source puts extra source in install targets. --- build.jam | 84 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/build.jam b/build.jam index 1d3438ab7..978b7ae34 100644 --- a/build.jam +++ b/build.jam @@ -7,48 +7,48 @@ import project ; project /boost/log : common-requirements - /boost/align//boost_align - /boost/array//boost_array - /boost/asio//boost_asio - /boost/assert//boost_assert - /boost/atomic//boost_atomic - /boost/bind//boost_bind - /boost/config//boost_config - /boost/container//boost_container - /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/interprocess//boost_interprocess - /boost/intrusive//boost_intrusive - /boost/io//boost_io - /boost/iterator//boost_iterator - /boost/lexical_cast//boost_lexical_cast - /boost/move//boost_move - /boost/mpl//boost_mpl - /boost/optional//boost_optional - /boost/parameter//boost_parameter - /boost/phoenix//boost_phoenix - /boost/predef//boost_predef - /boost/preprocessor//boost_preprocessor - /boost/property_tree//boost_property_tree - /boost/proto//boost_proto - /boost/random//boost_random - /boost/range//boost_range - /boost/regex//boost_regex - /boost/smart_ptr//boost_smart_ptr - /boost/spirit//boost_spirit - /boost/static_assert//boost_static_assert - /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 + /boost/align//boost_align + /boost/array//boost_array + /boost/asio//boost_asio + /boost/assert//boost_assert + /boost/atomic//boost_atomic + /boost/bind//boost_bind + /boost/config//boost_config + /boost/container//boost_container + /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/interprocess//boost_interprocess + /boost/intrusive//boost_intrusive + /boost/io//boost_io + /boost/iterator//boost_iterator + /boost/lexical_cast//boost_lexical_cast + /boost/move//boost_move + /boost/mpl//boost_mpl + /boost/optional//boost_optional + /boost/parameter//boost_parameter + /boost/phoenix//boost_phoenix + /boost/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/property_tree//boost_property_tree + /boost/proto//boost_proto + /boost/random//boost_random + /boost/range//boost_range + /boost/regex//boost_regex + /boost/smart_ptr//boost_smart_ptr + /boost/spirit//boost_spirit + /boost/static_assert//boost_static_assert + /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 include ; From 163988d6191cd83e9d7618280d2221c232a11eaa Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 9 Apr 2024 21:49:24 -0500 Subject: [PATCH 03/22] Clean up build dependencies. --- build.jam | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.jam b/build.jam index 978b7ae34..2f45a2c16 100644 --- a/build.jam +++ b/build.jam @@ -12,9 +12,7 @@ project /boost/log /boost/asio//boost_asio /boost/assert//boost_assert /boost/atomic//boost_atomic - /boost/bind//boost_bind /boost/config//boost_config - /boost/container//boost_container /boost/core//boost_core /boost/date_time//boost_date_time /boost/exception//boost_exception @@ -25,7 +23,6 @@ project /boost/log /boost/intrusive//boost_intrusive /boost/io//boost_io /boost/iterator//boost_iterator - /boost/lexical_cast//boost_lexical_cast /boost/move//boost_move /boost/mpl//boost_mpl /boost/optional//boost_optional @@ -40,7 +37,6 @@ project /boost/log /boost/regex//boost_regex /boost/smart_ptr//boost_smart_ptr /boost/spirit//boost_spirit - /boost/static_assert//boost_static_assert /boost/system//boost_system /boost/thread//boost_thread /boost/throw_exception//boost_throw_exception From b13410314ef6153e5ec54d22afedde24c1bcff2f Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 9 Apr 2024 23:49:40 -0500 Subject: [PATCH 04/22] Remove external build references and avoid custom project loading. --- build.jam | 9 +++ build/Jamfile.v2 | 9 +-- build/log-arch-config.jam | 97 +-------------------------------- build/log-build-config.jam | 10 ---- build/log-platform-config.jam | 6 -- config/atomic-int32/Jamfile.jam | 2 +- config/x86-ext/Jamfile.jam | 2 +- 7 files changed, 13 insertions(+), 122 deletions(-) diff --git a/build.jam b/build.jam index 2f45a2c16..1ece50313 100644 --- a/build.jam +++ b/build.jam @@ -48,6 +48,15 @@ project /boost/log include ; +path-constant HERE : . ; +use-project /boost/log/atomic-int32 : $(HERE)/config/atomic-int32 ; +use-project /boost/log/message-compiler : $(HERE)/config/message-compiler ; +use-project /boost/log/native-syslog : $(HERE)/config/native-syslog ; +use-project /boost/log/pthread-mutex-robust : $(HERE)/config/pthread-mutex-robust ; +use-project /boost/log/regex-header-only : $(HERE)/config/regex-header-only ; +use-project /boost/log/x86-extensions : $(HERE)/config/x86-ext ; +use-project /boost/log/xopen-source-600 : $(HERE)/config/xopen-source-600 ; + explicit [ alias boost_log : build//boost_log ] [ alias boost_log_setup : build//boost_log_setup ] diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 71abfb9fc..ef9d477dd 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -19,12 +19,6 @@ import log-build-config ; using mc ; -local here = [ modules.binding $(__name__) ] ; - -project.push-current [ project.current ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/x86-ext ] ; -project.pop-current ; - # Windows libs searched-lib psapi ; searched-lib advapi32 ; @@ -60,7 +54,6 @@ local log_setup_cxx_public_requirements = [ requires project : source-location ../src : requirements - @log-arch-config.check-instruction-set @log-build-config.check-atomic-int32 @log-build-config.select-regex-backend @log-build-config.check-pthread-mutex-robust @@ -214,7 +207,7 @@ rule select-arch-specific-sources ( properties * ) { local result ; - if x86 in [ log-arch-config.deduce-architecture $(properties) ] + if x86 in $(properties) { local has_ssse3 = [ configure.builds /boost/log/x86-extensions//ssse3 : $(properties) : "compiler supports SSSE3" ] ; if $(has_ssse3) diff --git a/build/log-arch-config.jam b/build/log-arch-config.jam index ee410ce1e..a521f830b 100644 --- a/build/log-arch-config.jam +++ b/build/log-arch-config.jam @@ -13,89 +13,8 @@ import path ; import property ; import feature ; -local here = [ modules.binding $(__name__) ] ; - -project.push-current [ project.current ] ; -project.load [ path.join [ path.make $(here:D) ] ../../config/checks/architecture ] ; -project.pop-current ; - -rule deduce-address-model ( properties * ) -{ - local address_model = [ feature.get-values "address-model" : $(properties) ] ; - if $(address_model) - { - return $(address_model) ; - } - else - { - if [ configure.builds /boost/architecture//32 : $(properties) : 32-bit ] - { - return 32 ; - } - else if [ configure.builds /boost/architecture//64 : $(properties) : 64-bit ] - { - return 64 ; - } - } -} - -rule deduce-architecture ( properties * ) -{ - local architecture = [ feature.get-values "architecture" : $(properties) ] ; - if $(architecture) - { - return $(architecture) ; - } - else - { - if [ configure.builds /boost/architecture//x86 : $(properties) : x86 ] - { - return x86 ; - } - else if [ configure.builds /boost/architecture//arm : $(properties) : arm ] - { - return arm ; - } - else if [ configure.builds /boost/architecture//mips : $(properties) : mips ] - { - return mips ; - } - else if [ configure.builds /boost/architecture//power : $(properties) : power ] - { - return power ; - } - else if [ configure.builds /boost/architecture//sparc : $(properties) : sparc ] - { - return sparc ; - } - } -} - -rule deduce-instruction-set ( properties * ) -{ - local result ; - local instruction_set = [ feature.get-values "instruction-set" : $(properties) ] ; - - if $(instruction_set) - { - result = $(instruction_set) ; - } - else - { - if x86 in [ deduce-architecture $(properties) ] && 32 in [ deduce-address-model $(properties) ] - { - # We build for Pentium Pro and later CPUs by default. This is used as the target in many Linux distributions, and Windows and OS X also seem to not support older CPUs. - result = i686 ; - } - } - - return $(result) ; -} - rule ssse3-flags ( properties * ) { - local result ; - if intel in $(properties) { if win in $(properties) @@ -111,7 +30,7 @@ rule ssse3-flags ( properties * ) { # MSVC doesn't really care about these switches, all SSE intrinsics are always available, but still... # Also 64 bit MSVC doesn't have the /arch:SSE2 switch as it is the default. - if 32 in [ deduce-address-model $(properties) ] + if 32 in $(properties) { result = "/arch:SSE2" ; } @@ -157,18 +76,4 @@ rule avx2-flags ( properties * ) rule check-instruction-set ( properties * ) { - local result ; - local instruction_set = [ log-arch-config.deduce-instruction-set $(properties) ] ; - - if $(instruction_set) = i386 || $(instruction_set) = i486 - { - if ! $(.annouced-failure) - { - ECHO Boost.Log is not supported on the specified target CPU and will not be built. At least i586 class CPU is required. ; - .annouced-failure = 1 ; - } - result = no ; - } - - return $(result) ; } diff --git a/build/log-build-config.jam b/build/log-build-config.jam index 51cc31279..581160df5 100644 --- a/build/log-build-config.jam +++ b/build/log-build-config.jam @@ -12,16 +12,6 @@ import path ; import property ; import feature ; -local here = [ modules.binding $(__name__) ] ; - -project.push-current [ project.current ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/message-compiler ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/pthread-mutex-robust ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/native-syslog ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/atomic-int32 ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/regex-header-only ] ; -project.pop-current ; - rule has-config-flag ( flag : properties * ) { if ( "$(flag)" in $(properties) || "$(flag)=1" in $(properties) ) diff --git a/build/log-platform-config.jam b/build/log-platform-config.jam index 93b31431b..bb572ea5d 100644 --- a/build/log-platform-config.jam +++ b/build/log-platform-config.jam @@ -12,12 +12,6 @@ import path ; import property ; import feature ; -local here = [ modules.binding $(__name__) ] ; - -project.push-current [ project.current ] ; -project.load [ path.join [ path.make $(here:D) ] ../config/xopen-source-600 ] ; -project.pop-current ; - rule set-platform-defines ( properties * ) { local result ; diff --git a/config/atomic-int32/Jamfile.jam b/config/atomic-int32/Jamfile.jam index 2f8d4baf2..3a99f7027 100644 --- a/config/atomic-int32/Jamfile.jam +++ b/config/atomic-int32/Jamfile.jam @@ -6,7 +6,7 @@ # import project ; -import log-platform-config ; +import ../../build/log-platform-config ; project /boost/log/atomic-int32 : source-location . diff --git a/config/x86-ext/Jamfile.jam b/config/x86-ext/Jamfile.jam index 5379dbd16..7c313f581 100644 --- a/config/x86-ext/Jamfile.jam +++ b/config/x86-ext/Jamfile.jam @@ -6,7 +6,7 @@ # import project ; -import log-arch-config ; +import ../../build/log-arch-config ; project /boost/log/x86-extensions : source-location . From 432325442e65274cb86cfc14991eb87dc558fa87 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 12 Apr 2024 22:17:21 -0500 Subject: [PATCH 05/22] Use relative paths to declare config sub-projects. --- build.jam | 15 +++++++-------- config/build.jam | 0 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 config/build.jam diff --git a/build.jam b/build.jam index 1ece50313..3ac2d4aa4 100644 --- a/build.jam +++ b/build.jam @@ -48,14 +48,13 @@ project /boost/log include ; -path-constant HERE : . ; -use-project /boost/log/atomic-int32 : $(HERE)/config/atomic-int32 ; -use-project /boost/log/message-compiler : $(HERE)/config/message-compiler ; -use-project /boost/log/native-syslog : $(HERE)/config/native-syslog ; -use-project /boost/log/pthread-mutex-robust : $(HERE)/config/pthread-mutex-robust ; -use-project /boost/log/regex-header-only : $(HERE)/config/regex-header-only ; -use-project /boost/log/x86-extensions : $(HERE)/config/x86-ext ; -use-project /boost/log/xopen-source-600 : $(HERE)/config/xopen-source-600 ; +use-project /boost/log/atomic-int32 : config/atomic-int32 ; +use-project /boost/log/message-compiler : config/message-compiler ; +use-project /boost/log/native-syslog : config/native-syslog ; +use-project /boost/log/pthread-mutex-robust : config/pthread-mutex-robust ; +use-project /boost/log/regex-header-only : config/regex-header-only ; +use-project /boost/log/x86-extensions : config/x86-ext ; +use-project /boost/log/xopen-source-600 : config/xopen-source-600 ; explicit [ alias boost_log : build//boost_log ] diff --git a/config/build.jam b/config/build.jam new file mode 100644 index 000000000..e69de29bb From e41adeea363f720254a5e2fe9ee550647d55ca38 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Apr 2024 20:16:04 -0500 Subject: [PATCH 06/22] Add missing NO_LIB usage requirements. --- build/Jamfile.v2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index ef9d477dd..8ad8f9610 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -297,6 +297,7 @@ lib boost_log : ## usage-requirements ## shared:BOOST_LOG_DYN_LINK=1 single:BOOST_LOG_NO_THREADS + BOOST_LOG_NO_LIB=1 $(log_cxx_public_requirements) ; @@ -340,5 +341,6 @@ lib boost_log_setup : ## 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) ; From 803e7fb191f5bbe84116ce636da37f5a1fab48e9 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 29 Apr 2024 12:52:32 -0500 Subject: [PATCH 07/22] Add missing library ref. --- example/doc/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/example/doc/Jamfile.v2 b/example/doc/Jamfile.v2 index 769a11655..905d37827 100644 --- a/example/doc/Jamfile.v2 +++ b/example/doc/Jamfile.v2 @@ -91,6 +91,7 @@ project /boost/thread//boost_thread /boost/lambda//boost_lambda /boost/scope_exit//boost_scope_exit + /boost/format//boost_format multi ; From 0333e7345f5a1dd7fcbf03d04a3f9ed9daebc461 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 4 May 2024 23:30:21 -0500 Subject: [PATCH 08/22] Add missing import-search for cconfig/predef checks. --- build/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 8ad8f9610..ec5056a36 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -12,6 +12,7 @@ import path ; import project ; import feature ; import configure ; +import-search /boost/config/checks ; import config : requires ; import log-arch-config ; import log-platform-config ; From e92235693a94b1fd73c3b412ed8b03b34f85d266 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 5 May 2024 09:00:01 -0500 Subject: [PATCH 09/22] 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 3ac2d4aa4..75141e8cb 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/log From 2fa69ed208cb7889f97a752ee9032b649f27b180 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Mon, 13 May 2024 21:46:14 -0500 Subject: [PATCH 10/22] Update dependencies. --- build.jam | 1 - 1 file changed, 1 deletion(-) diff --git a/build.jam b/build.jam index 75141e8cb..21610056e 100644 --- a/build.jam +++ b/build.jam @@ -10,7 +10,6 @@ import project ; project /boost/log : common-requirements /boost/align//boost_align - /boost/array//boost_array /boost/asio//boost_asio /boost/assert//boost_assert /boost/atomic//boost_atomic From 747fef308e3c8d477d4ad033f243370fa298452c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Fri, 14 Jun 2024 11:33:56 -0500 Subject: [PATCH 11/22] 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 21610056e..84446fbf8 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/log : common-requirements From 3585ee8c6a0b444ed97e3df01665e1d3229f02b8 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 20 Jul 2024 22:52:03 -0500 Subject: [PATCH 12/22] Update copyright dates. --- build.jam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.jam b/build.jam index 84446fbf8..677639871 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 ef26b2fabb916df83e57665a52f4e3d9acf01394 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 23 Jul 2024 22:34:22 -0500 Subject: [PATCH 13/22] Move inter-lib dependencies to a project variable and into the build targets. --- build.jam | 77 +++++++++++++++++++++++++----------------------- build/Jamfile.v2 | 1 + 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/build.jam b/build.jam index 677639871..a6f9d08f9 100644 --- a/build.jam +++ b/build.jam @@ -5,45 +5,47 @@ require-b2 5.2 ; +constant boost_dependencies : + /boost/align//boost_align + /boost/asio//boost_asio + /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/interprocess//boost_interprocess + /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/predef//boost_predef + /boost/preprocessor//boost_preprocessor + /boost/property_tree//boost_property_tree + /boost/proto//boost_proto + /boost/random//boost_random + /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 - /boost/align//boost_align - /boost/asio//boost_asio - /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/interprocess//boost_interprocess - /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/predef//boost_predef - /boost/preprocessor//boost_preprocessor - /boost/property_tree//boost_property_tree - /boost/proto//boost_proto - /boost/random//boost_random - /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 include ; @@ -64,3 +66,4 @@ explicit call-if : boost-library log : install boost_log boost_log_setup ; + diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index ec5056a36..a514cd53a 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -54,6 +54,7 @@ local log_setup_cxx_public_requirements = [ requires project : source-location ../src + : common-requirements $(boost_dependencies) : requirements @log-build-config.check-atomic-int32 @log-build-config.select-regex-backend From 1590c12e9e4f7a41533351828121fb7e3378068b Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 24 Jul 2024 14:40:42 -0500 Subject: [PATCH 14/22] Remove custom symbolic project names for config subprojects. And use project root relative targets. --- build.jam | 9 --------- build/Jamfile.v2 | 4 ++-- build/log-build-config.jam | 10 +++++----- build/log-platform-config.jam | 2 +- config/atomic-int32/Jamfile.jam | 2 +- config/message-compiler/Jamfile.jam | 2 +- config/native-syslog/Jamfile.jam | 2 +- config/pthread-mutex-robust/Jamfile.jam | 2 +- config/regex-header-only/Jamfile.jam | 2 +- config/x86-ext/Jamfile.jam | 2 +- config/xopen-source-600/Jamfile.jam | 2 +- example/doc/Jamfile.v2 | 2 +- example/event_log/Jamfile.v2 | 2 +- 13 files changed, 17 insertions(+), 26 deletions(-) diff --git a/build.jam b/build.jam index a6f9d08f9..2914b4cb0 100644 --- a/build.jam +++ b/build.jam @@ -49,14 +49,6 @@ project /boost/log include ; -use-project /boost/log/atomic-int32 : config/atomic-int32 ; -use-project /boost/log/message-compiler : config/message-compiler ; -use-project /boost/log/native-syslog : config/native-syslog ; -use-project /boost/log/pthread-mutex-robust : config/pthread-mutex-robust ; -use-project /boost/log/regex-header-only : config/regex-header-only ; -use-project /boost/log/x86-extensions : config/x86-ext ; -use-project /boost/log/xopen-source-600 : config/xopen-source-600 ; - explicit [ alias boost_log : build//boost_log ] [ alias boost_log_setup : build//boost_log_setup ] @@ -66,4 +58,3 @@ explicit call-if : boost-library log : install boost_log boost_log_setup ; - diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index a514cd53a..3033fc02d 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -211,14 +211,14 @@ rule select-arch-specific-sources ( properties * ) if x86 in $(properties) { - local has_ssse3 = [ configure.builds /boost/log/x86-extensions//ssse3 : $(properties) : "compiler supports SSSE3" ] ; + local has_ssse3 = [ configure.builds /boost/log/config/x86-ext//ssse3 : $(properties) : "compiler supports SSSE3" ] ; if $(has_ssse3) { result += BOOST_LOG_USE_SSSE3 ; result += $(BOOST_LOG_COMMON_SSSE3_SRC) ; } - local has_avx2 = [ configure.builds /boost/log/x86-extensions//avx2 : $(properties) : "compiler supports AVX2" ] ; + local has_avx2 = [ configure.builds /boost/log/config/x86-ext//avx2 : $(properties) : "compiler supports AVX2" ] ; if $(has_avx2) { result += BOOST_LOG_USE_AVX2 ; diff --git a/build/log-build-config.jam b/build/log-build-config.jam index 581160df5..e32e720d6 100644 --- a/build/log-build-config.jam +++ b/build/log-build-config.jam @@ -28,7 +28,7 @@ rule check-regex-header-only ( properties * ) { local result ; - local has_regex_header_only = [ configure.builds /boost/log/regex-header-only//regex_header_only : $(properties) : "Boost.Regex is header-only" ] ; + local has_regex_header_only = [ configure.builds /boost/log/config/regex-header-only//regex_header_only : $(properties) : "Boost.Regex is header-only" ] ; if ! $(has_regex_header_only) { result = /boost/regex//boost_regex ; @@ -41,7 +41,7 @@ rule check-atomic-int32 ( properties * ) { local result ; - local has_atomic_int32 = [ configure.builds /boost/log/atomic-int32//atomic_int32 : $(properties) : "native atomic int32 supported" ] ; + local has_atomic_int32 = [ configure.builds /boost/log/config/atomic-int32//atomic_int32 : $(properties) : "native atomic int32 supported" ] ; if ! $(has_atomic_int32) { result = BOOST_LOG_WITHOUT_IPC ; @@ -54,7 +54,7 @@ rule check-pthread-mutex-robust ( properties * ) { local result ; - local has_pthread_mutex_robust = [ configure.builds /boost/log/pthread-mutex-robust//pthread_mutex_robust : $(properties) : "pthread supports robust mutexes" ] ; + local has_pthread_mutex_robust = [ configure.builds /boost/log/config/pthread-mutex-robust//pthread_mutex_robust : $(properties) : "pthread supports robust mutexes" ] ; if $(has_pthread_mutex_robust) { result = BOOST_LOG_HAS_PTHREAD_MUTEX_ROBUST ; @@ -69,7 +69,7 @@ rule check-native-syslog ( properties * ) if ! [ has-config-flag BOOST_LOG_WITHOUT_SYSLOG : $(properties) ] { - local has_native_syslog = [ configure.builds /boost/log/native-syslog//native_syslog : $(properties) : "native syslog supported" ] ; + local has_native_syslog = [ configure.builds /boost/log/config/native-syslog//native_syslog : $(properties) : "native syslog supported" ] ; if $(has_native_syslog) { result = BOOST_LOG_USE_NATIVE_SYSLOG ; @@ -87,7 +87,7 @@ rule check-message-compiler ( properties * ) { if ! [ has-config-flag BOOST_LOG_WITHOUT_EVENT_LOG : $(properties) ] { - local has_mc = [ configure.builds /boost/log/message-compiler//test-availability : $(properties) : "has message compiler" ] ; + local has_mc = [ configure.builds /boost/log/config/message-compiler//test-availability : $(properties) : "has message compiler" ] ; if ! $(has_mc) { result = BOOST_LOG_WITHOUT_EVENT_LOG ; diff --git a/build/log-platform-config.jam b/build/log-platform-config.jam index bb572ea5d..d83d41f12 100644 --- a/build/log-platform-config.jam +++ b/build/log-platform-config.jam @@ -43,7 +43,7 @@ rule set-platform-defines ( properties * ) { # Solaris headers are broken and cannot be included in C++03 when _XOPEN_SOURCE=600. At the same time, they cannot be included with _XOPEN_SOURCE=500 in C++11 and later. # This is because the system headers check the C language version and error out if the version does not match. We have to test if we can request _XOPEN_SOURCE=600. - if [ configure.builds /boost/log/xopen-source-600//xopen_source_600 : $(properties) : xopen-source-600-supported ] + if [ configure.builds /boost/log/config/xopen-source-600//xopen_source_600 : $(properties) : xopen-source-600-supported ] { result += _XOPEN_SOURCE=600 ; } diff --git a/config/atomic-int32/Jamfile.jam b/config/atomic-int32/Jamfile.jam index 3a99f7027..308ce9417 100644 --- a/config/atomic-int32/Jamfile.jam +++ b/config/atomic-int32/Jamfile.jam @@ -8,7 +8,7 @@ import project ; import ../../build/log-platform-config ; -project /boost/log/atomic-int32 +project : source-location . : requirements @log-platform-config.set-platform-defines diff --git a/config/message-compiler/Jamfile.jam b/config/message-compiler/Jamfile.jam index 6716021bb..a42b801ec 100644 --- a/config/message-compiler/Jamfile.jam +++ b/config/message-compiler/Jamfile.jam @@ -9,7 +9,7 @@ import project ; import log-platform-config ; using mc ; -project /boost/log/message-compiler +project : source-location ../../src : requirements @log-platform-config.set-platform-defines diff --git a/config/native-syslog/Jamfile.jam b/config/native-syslog/Jamfile.jam index dd9143f50..3c8915404 100644 --- a/config/native-syslog/Jamfile.jam +++ b/config/native-syslog/Jamfile.jam @@ -8,7 +8,7 @@ import project ; import log-platform-config ; -project /boost/log/native-syslog +project : source-location . : requirements @log-platform-config.set-platform-defines diff --git a/config/pthread-mutex-robust/Jamfile.jam b/config/pthread-mutex-robust/Jamfile.jam index ac3de06bd..49cd19935 100644 --- a/config/pthread-mutex-robust/Jamfile.jam +++ b/config/pthread-mutex-robust/Jamfile.jam @@ -8,7 +8,7 @@ import project ; import log-platform-config ; -project /boost/log/pthread-mutex-robust +project : source-location . : requirements @log-platform-config.set-platform-defines diff --git a/config/regex-header-only/Jamfile.jam b/config/regex-header-only/Jamfile.jam index 90d28e94f..4f5873eee 100644 --- a/config/regex-header-only/Jamfile.jam +++ b/config/regex-header-only/Jamfile.jam @@ -8,7 +8,7 @@ import project ; import log-platform-config ; -project /boost/log/regex-header-only +project : source-location . : requirements @log-platform-config.set-platform-defines diff --git a/config/x86-ext/Jamfile.jam b/config/x86-ext/Jamfile.jam index 7c313f581..a010067e7 100644 --- a/config/x86-ext/Jamfile.jam +++ b/config/x86-ext/Jamfile.jam @@ -8,7 +8,7 @@ import project ; import ../../build/log-arch-config ; -project /boost/log/x86-extensions +project : source-location . : requirements off diff --git a/config/xopen-source-600/Jamfile.jam b/config/xopen-source-600/Jamfile.jam index d2a28ad56..b35fa4652 100644 --- a/config/xopen-source-600/Jamfile.jam +++ b/config/xopen-source-600/Jamfile.jam @@ -7,7 +7,7 @@ import project ; -project /boost/log/xopen-source-600 +project : source-location . : requirements off diff --git a/example/doc/Jamfile.v2 b/example/doc/Jamfile.v2 index 905d37827..c84959ef1 100644 --- a/example/doc/Jamfile.v2 +++ b/example/doc/Jamfile.v2 @@ -29,7 +29,7 @@ rule check-message-compiler ( properties * ) { if ! [ has-config-flag BOOST_LOG_WITHOUT_EVENT_LOG : $(properties) ] { - local has_mc = [ configure.builds /boost/log/message-compiler//test-availability : $(properties) : message-compiler ] ; + local has_mc = [ configure.builds /boost/log/config/message-compiler//test-availability : $(properties) : message-compiler ] ; if ! $(has_mc) { result = BOOST_LOG_WITHOUT_EVENT_LOG ; diff --git a/example/event_log/Jamfile.v2 b/example/event_log/Jamfile.v2 index d876ec7a7..7a17043b7 100644 --- a/example/event_log/Jamfile.v2 +++ b/example/event_log/Jamfile.v2 @@ -29,7 +29,7 @@ rule check-message-compiler ( properties * ) { if ! [ has-config-flag BOOST_LOG_WITHOUT_EVENT_LOG : $(properties) ] { - local has_mc = [ configure.builds /boost/log/message-compiler//test-availability : $(properties) : message-compiler ] ; + local has_mc = [ configure.builds /boost/log/config/message-compiler//test-availability : $(properties) : message-compiler ] ; if ! $(has_mc) { result += no ; From 63c262ecc0c4837c82e819887ef81d9b2bb6fe9c Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 24 Jul 2024 17:49:42 -0500 Subject: [PATCH 15/22] Move private deps to the build project. --- build.jam | 5 ----- build/Jamfile.v2 | 8 ++++++++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build.jam b/build.jam index 2914b4cb0..0e6525b20 100644 --- a/build.jam +++ b/build.jam @@ -6,8 +6,6 @@ require-b2 5.2 ; constant boost_dependencies : - /boost/align//boost_align - /boost/asio//boost_asio /boost/assert//boost_assert /boost/atomic//boost_atomic /boost/config//boost_config @@ -17,7 +15,6 @@ constant boost_dependencies : /boost/filesystem//boost_filesystem /boost/function_types//boost_function_types /boost/fusion//boost_fusion - /boost/interprocess//boost_interprocess /boost/intrusive//boost_intrusive /boost/io//boost_io /boost/iterator//boost_iterator @@ -26,11 +23,9 @@ constant boost_dependencies : /boost/optional//boost_optional /boost/parameter//boost_parameter /boost/phoenix//boost_phoenix - /boost/predef//boost_predef /boost/preprocessor//boost_preprocessor /boost/property_tree//boost_property_tree /boost/proto//boost_proto - /boost/random//boost_random /boost/range//boost_range /boost/regex//boost_regex /boost/smart_ptr//boost_smart_ptr diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 3033fc02d..24ab40bec 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -52,10 +52,18 @@ local log_setup_cxx_public_requirements = [ 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) : requirements + $(boost_dependencies_private) @log-build-config.check-atomic-int32 @log-build-config.select-regex-backend @log-build-config.check-pthread-mutex-robust From c3f43bcc1980bdd2959623a077e990c561c91d2d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Wed, 24 Jul 2024 21:41:06 -0500 Subject: [PATCH 16/22] Put back default boost locale link as locale build is now fixed. --- example/wide_char/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/wide_char/Jamfile.v2 b/example/wide_char/Jamfile.v2 index dc29cba62..dab6836fe 100644 --- a/example/wide_char/Jamfile.v2 +++ b/example/wide_char/Jamfile.v2 @@ -42,7 +42,7 @@ project /boost/log//boost_log_setup /boost/date_time//boost_date_time /boost/filesystem//boost_filesystem - /boost/locale//boost_locale/static + /boost/locale//boost_locale /boost/thread//boost_thread multi From 3d42a6c70528852e034ea037c50c05d49b9b80ae Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 25 Jul 2024 17:14:23 -0500 Subject: [PATCH 17/22] Set default address-model and architecture to avoid extra/custom detection logic. Put back missing check and config rules. --- build/Jamfile.v2 | 7 ++++++ build/log-arch-config.jam | 48 +++++++++++++++++++++++++++++++++++++++ config/build.jam | 14 ++++++++++++ test/Jamfile.v2 | 5 ++-- 4 files changed, 72 insertions(+), 2 deletions(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 24ab40bec..734203426 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -17,6 +17,8 @@ import config : requires ; import log-arch-config ; import log-platform-config ; import log-build-config ; +import-search /boost/predef/tools ; +import predef ; using mc ; @@ -64,6 +66,7 @@ project : common-requirements $(boost_dependencies) : requirements $(boost_dependencies_private) + @log-arch-config.check-instruction-set @log-build-config.check-atomic-int32 @log-build-config.select-regex-backend @log-build-config.check-pthread-mutex-robust @@ -132,6 +135,10 @@ project freebsd:rt qnxnto:socket pgi:rt + + # Set these to computed values according to the build. + [ predef.address-model ] + [ predef.architecture ] : usage-requirements clang:-Wno-bind-to-temporary-copy clang:-Wno-unused-function diff --git a/build/log-arch-config.jam b/build/log-arch-config.jam index a521f830b..b5438ff00 100644 --- a/build/log-arch-config.jam +++ b/build/log-arch-config.jam @@ -13,8 +13,42 @@ import path ; import property ; import feature ; +rule deduce-address-model ( properties * ) +{ + # The address-model is always set to a deduced value using the predef.address-model checks. + return [ feature.get-values : $(properties) ] ; +} + +rule deduce-architecture ( properties * ) +{ + # The architecture is always set to a deduced value using the predef.architecture checks. + return [ feature.get-values : $(properties) ] ; +} + +rule deduce-instruction-set ( properties * ) +{ + local result ; + local instruction_set = [ feature.get-values : $(properties) ] ; + + if $(instruction_set) + { + result = $(instruction_set) ; + } + else + { + if x86 in [ deduce-architecture $(properties) ] && 32 in [ deduce-address-model $(properties) ] + { + # We build for Pentium Pro and later CPUs by default. This is used as the target in many Linux distributions, and Windows and OS X also seem to not support older CPUs. + result = i686 ; + } + } + + return $(result) ; +} + rule ssse3-flags ( properties * ) { + local result ; if intel in $(properties) { if win in $(properties) @@ -76,4 +110,18 @@ rule avx2-flags ( properties * ) rule check-instruction-set ( properties * ) { + local result ; + local instruction_set = [ log-arch-config.deduce-instruction-set $(properties) ] ; + + if $(instruction_set) = i386 || $(instruction_set) = i486 + { + if ! $(.annouced-failure) + { + ECHO Boost.Log is not supported on the specified target CPU and will not be built. At least i586 class CPU is required. ; + .annouced-failure = 1 ; + } + result = no ; + } + + return $(result) ; } diff --git a/config/build.jam b/config/build.jam index e69de29bb..116fca8b2 100644 --- a/config/build.jam +++ b/config/build.jam @@ -0,0 +1,14 @@ +# Copyright René Ferdinand Rivera Morell +# 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-search /boost/predef/tools ; +import predef ; + +project + : requirements + # Set these to computed values according to the build. + [ predef.address-model ] + [ predef.architecture ] + ; diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 33485c02e..ed5a616a6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -72,9 +72,10 @@ rule test_all if ! [ os.environ BOOST_LOG_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ] { - for file in [ glob-tree-ex ../include/boost/log : *.hpp : detail ] + local headers_path = ../include/boost/log ; + for file in [ glob-tree-ex $(headers_path) : *.hpp : detail ] { - local rel_file = [ path.relative-to ../include/boost/log $(file) ] ; + local rel_file = [ path.relative-to $(headers_path) $(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 4e1a3a25b9658daf7ca9e2c6143a0946528b2d2d Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sun, 28 Jul 2024 11:13:09 -0500 Subject: [PATCH 18/22] Adjust doc build to avoid boost-root references. --- doc/Jamfile.v2 | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index adc588260..46bd2bdb8 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -86,57 +86,57 @@ local doxygen_params = local top_level_includes = [ glob - ../../../boost/log/*.hpp + ../include/boost/log/*.hpp ] ; local core_includes = [ glob - ../../../boost/log/core/*.hpp + ../include/boost/log/core/*.hpp ] ; local attributes_includes = [ glob - ../../../boost/log/attributes/*.hpp + ../include/boost/log/attributes/*.hpp ] ; local expressions_includes = [ glob - ../../../boost/log/expressions/*.hpp - ../../../boost/log/expressions/predicates/*.hpp - ../../../boost/log/expressions/formatters/*.hpp + ../include/boost/log/expressions/*.hpp + ../include/boost/log/expressions/predicates/*.hpp + ../include/boost/log/expressions/formatters/*.hpp ] ; local sources_includes = [ glob - ../../../boost/log/sources/*.hpp + ../include/boost/log/sources/*.hpp ] ; local sinks_includes = [ set.difference # Document all these files... [ glob - ../../../boost/log/sinks/*.hpp + ../include/boost/log/sinks/*.hpp ] : # ...except these [ glob - ../../../boost/log/sinks/nt6_event_log*.hpp + ../include/boost/log/sinks/nt6_event_log*.hpp ] ] ; local utility_includes = [ glob - ../../../boost/log/utility/*.hpp - ../../../boost/log/utility/ipc/*.hpp - ../../../boost/log/utility/setup/*.hpp - ../../../boost/log/utility/type_dispatch/*.hpp - ../../../boost/log/utility/functional/*.hpp - ../../../boost/log/utility/manipulators/*.hpp + ../include/boost/log/utility/*.hpp + ../include/boost/log/utility/ipc/*.hpp + ../include/boost/log/utility/setup/*.hpp + ../include/boost/log/utility/type_dispatch/*.hpp + ../include/boost/log/utility/functional/*.hpp + ../include/boost/log/utility/manipulators/*.hpp ] ; local support_includes = [ glob - ../../../boost/log/support/*.hpp + ../include/boost/log/support/*.hpp ] ; From fe85ada92649773b9dc4123151c9f3c1f63e620e Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Sat, 3 Aug 2024 17:13:29 -0500 Subject: [PATCH 19/22] Fix ref to predef.jam location. --- build/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 734203426..2902bf6c5 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -17,7 +17,7 @@ import config : requires ; import log-arch-config ; import log-platform-config ; import log-build-config ; -import-search /boost/predef/tools ; +import-search /boost/predef/tools/check ; import predef ; using mc ; From bf3c45927a594d15eef1207d8e8fecd8d478b141 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 5 Sep 2024 00:44:14 -0500 Subject: [PATCH 20/22] 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 From 9313e79a65606c5d8ab8e91aa34812adc6cdf222 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 5 Sep 2024 07:14:39 -0500 Subject: [PATCH 21/22] Add log dep to log_setup, as it's needed on some platforms. --- build/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index de14a8818..45cc958b8 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -106,6 +106,7 @@ constant boost_log_setup_private_deps : /boost/exception//boost_exception /boost/filesystem//boost_filesystem /boost/io//boost_io + /boost/log//boost_log /boost/spirit//boost_spirit /boost/throw_exception//boost_throw_exception /boost/utility//boost_utility From 994a46da93676cdf08fb036611c13617ae8f9a41 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Thu, 5 Sep 2024 08:56:49 -0500 Subject: [PATCH 22/22] Add boost_log_with_support target to mirror CML. --- build.jam | 3 ++- build/Jamfile.v2 | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/build.jam b/build.jam index e62a6f68f..aac1c89ec 100644 --- a/build.jam +++ b/build.jam @@ -10,7 +10,8 @@ project /boost/log ; explicit [ alias boost_log : build//boost_log ] [ alias boost_log_setup : build//boost_log_setup ] - [ alias all : boost_log boost_log_setup example test ] + [ alias boost_log_with_support : build//boost_log_with_support ] + [ alias all : boost_log boost_log_setup boost_log_with_support example test ] ; call-if : boost-library log diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index 45cc958b8..5711b8c35 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -115,6 +115,13 @@ constant boost_log_setup_private_deps : ] ; +constant boost_log_support_public_deps : + /boost/log//boost_log + /boost/exception//boost_exception + /boost/spirit//boost_spirit + /boost/xpressive//boost_xpressive + ; + project : source-location ../src : common-requirements @@ -418,3 +425,10 @@ lib boost_log_setup BOOST_LOG_SETUP_NO_LIB=1 $(boost_log_setup_public_deps) ; + +alias boost_log_with_support + : requirements + $(boost_log_support_public_deps) + : usage-requirements + $(boost_log_support_public_deps) + ;