Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to write such a feature?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-09-22 00:16:42


Sherwood Hu wrote:
> The <define> property in Boost.Build does not propagate. This causes
> problems in my project, as the unit tests require a macro UNIT_TEST to
> be defined and the main library is built with this macro defined.
> Because <define> does not propagate, I have to specify <define>UNIT_TEST
> at the command line. If the library is built first without this macro,
> the unit tests will not be built successfully.
> I am considering to add a <unit-test> feature and make <define>UNIT_TEST
> propagate.
> Import feature : feature ;
> Feature unit-test : on off : propagated ;
> But how to add <define>UNIT_TEST when <unit-test>on?

Use a composite feature. They are documented at the bottom of

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at