Boost logo

Boost-Build :

Subject: [Boost-build] How to access/edit inherited (usage-)requirements?
From: Deniz Bahadir (D.Bahadir_at_[hidden])
Date: 2010-03-19 05:32:52

Hi there,

I am using Boost.Build to create different (shared) libraries which
later will be used for linking some programs. Each library has some
custom-features in its "usage-requirements". If I understand correct,
these custom-features will be in the "requirements" of the program
that links to these libraries.

Directly before creating the program I would like to search for these
custom-features in the programs requirements and adjust them or add
some extra features if they are found (e.g. add some extra libraries
using the "library"-feature).

For this, I created a wrapper-rule "CreateExe" which should do these
adjustments and call the built-in "exe"-rule with the adjusted
settings. However, I realized, that at this time the custom-features
still seem not to be put into the "requirements" of the
"CreateExe"-rule. I tried using the "targets.main-target-requirements"
and "targets.main-target-usage-requirements" rules to access the
"inherited" (usage-)requirements, but these just return an identifier
like "object(property-set)@1724" which I do not know how to use.

So, is there a possibility to achieve what I am trying to do (without
reimplementing the complete Boost.Build-behavior)? Will it also work
for higher levels of dependencies (e.g. program "A" depends on library
"B" which depends on library "C" ... which depends on library "Z", and
program "A" wants to adjust all custom-features from libraries "B" to

Thanks for your help.

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