Boost logo

Boost-Build :

Subject: Re: [Boost-build] how to add a dependency to a dependency
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-24 13:24:55


AMDG

Stjepan Rajko wrote:
> Thanks for the suggestion. I tried making use_window_manager a
> propagated feature, but as far as I could see it also needed to be a
> free feature (because you should be able to supply any window manager
> target, as long as it provides the right include files - in my case
> glut-compatible includes). But trying that caused a boost.build error
> message to the effect of "can't have free propagated features".
>
> When that didn't work, I tried to manually "push down" the
> <use_window_manager> value (given as B in the example) from Gplus to
> G, and then have G add the value it gets as <use_window_manager> as a
> <library> requirement / usage-requirement. Unfortunately I couldn't
> figure out exactly how to do that.
>

Instead of using a free feature, you can use a composite feature:

feature use_window_manager_impl : : dependency free ;
feature use_window_manager : : composite propagated ;

rule define-window-manager ( name : target )
{
    feature.extend use_window_manager : $(name) ;
    feature.compose <use_window_manager>$(name) :
<use_window_manager_impl>$(target) ;
}

This will also have the effect that you'll get separate build
directories for
each window manager.

In Christ,
Steven Watanabe


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