Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-08-31 06:51:50


   Hi Sven.

> I think I want the include path added to the usage requirements of the
> lib target. Is this possible and if so, how? In his response Vladimir
> said that the first element returned from a run rule may be a property
> set. I'm guessing these are requirements, right. Are they translated
> into usage requirements somehow or in any way propagated to other main
> targets? If usage requirements are not the way to go, what other
> alternatives do I have (given that #3 above doesn't work for me,
> although I may be missing something there too)?

   Take a look at the try-one-generator-really() rule from the
build/generators.jam module. That is the rule that actually calls a
generator's run() rule and processes its result.

   As I can see from it - Boost Build checks whether the first returned
value is of type property-set and if it is removes it from the list of
'targets' and instead uses it as additional usage-requirement properties
for all the generated targets.

   If you run bjam with --debug-generators you should see some debugging
output indicating which generators are being run and what targets and
usage-requirements they return. That could lead you to existing examples
using this same technique.

   If you are not using generators but the generate() rule instead, I
believe the same principle applies (take a look at the
generated-target-class.construct() rule in the tools/generate.jam module).

   Hope this helps.

   Best regards,
     Jurko Gospodnetić


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk