Skip to content

Commit

Permalink
Disable building boost_log_setup when settings parsers are disabled.
Browse files Browse the repository at this point in the history
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 #164.
Closes #165.
Blocked by bfgroup/b2#104.
  • Loading branch information
Lastique committed Jun 13, 2023
1 parent 756a3d0 commit b3ffed4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <build>no ;
}

return $(result) ;
}

lib boost_log_setup
: ## sources ##
setup/$(BOOST_LOG_SETUP_COMMON_SRC)
: ## requirements ##
<conditional>@check-boost_log_setup-enabled
<link>shared:<define>BOOST_LOG_DYN_LINK=1
<link>shared:<define>BOOST_LOG_SETUP_DLL
<define>BOOST_LOG_SETUP_BUILDING_THE_LIB=1
Expand Down

0 comments on commit b3ffed4

Please sign in to comment.