From b3ffed4ec2cdb376e9355a17d5e89ec2f3bc893a Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Tue, 19 Oct 2021 00:13:29 +0300 Subject: [PATCH] Disable building boost_log_setup when settings parsers are disabled. Check the BOOST_LOG_WITHOUT_SETTINGS_PARSERS macro in the Jamfile and suppress building boost_log_setup if it is defined. The built library is empty in this case, and MSVC linker even produces no library, which later breaks installation. Fixes https://github.com/boostorg/log/issues/164. Closes https://github.com/boostorg/log/pull/165. Blocked by https://github.com/bfgroup/b2/issues/104. --- build/Jamfile.v2 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/build/Jamfile.v2 b/build/Jamfile.v2 index a81fb8b27..46dd04596 100644 --- a/build/Jamfile.v2 +++ b/build/Jamfile.v2 @@ -418,10 +418,23 @@ local BOOST_LOG_SETUP_COMMON_SRC = default_formatter_factory.cpp ; +rule check-boost_log_setup-enabled ( properties * ) +{ + local result ; + + if [ has-config-flag BOOST_LOG_WITHOUT_SETTINGS_PARSERS : $(properties) ] + { + result = no ; + } + + return $(result) ; +} + lib boost_log_setup : ## sources ## setup/$(BOOST_LOG_SETUP_COMMON_SRC) : ## requirements ## + @check-boost_log_setup-enabled shared:BOOST_LOG_DYN_LINK=1 shared:BOOST_LOG_SETUP_DLL BOOST_LOG_SETUP_BUILDING_THE_LIB=1