Subject: Re: [Boost-build] how to add a dependency to a dependency
From: Stjepan Rajko (stjepan.rajko_at_[hidden])
Date: 2009-02-02 18:35:33
On Sun, Jan 25, 2009 at 4:54 PM, Stjepan Rajko <stjepan.rajko_at_[hidden]> wrote:
> On Sat, Jan 24, 2009 at 11:24 AM, Steven Watanabe <watanabesj_at_[hidden]> wrote:
>> 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
>> each window manager.
> Thanks again Steven, this is a good idea. I got something to work
> based on your suggestion in a simplified case, but am still having
> problems with my general situation. I have this in one Jamfile:
> feature.feature use_window_manager : : composite propagated ;
> In a Jamfile that describes how to link to the system glut / openGL, I
> have this:
> *** Alternative 3 (doesn't work) ***
> # lib glut, glut32, opengl32, glu32...
> alias platform_glut : : : :
> <toolset>darwin:<linkflags>"-framework GLUT -framework OpenGL"
> feature.extend use_window_manager : platform_glut ;
> feature.compose <use_window_manager>platform_glut
> : <library>/boost/guigl/platform//platform_glut ;
> # /boost/guigl/platform//platform_glut is the alias platform_glut
> *** End alternative 3 ***
> The above fails when a target has <use_window_manager>platform_glut in
> requirements, claiming recursion in main target references
> (platform_glut is built twice). I am assuming that since
> platform_glut becomes a dependency of of the target, it is added as a
> dependency to itself.
I finally got this to work:
feature.feature use_window_manager : none : composite propagated ;
feature.extend use_window_manager : platform_glut ;
Explicitly setting /<use_window_manager>none in the last line avoids
the recursion. Hackish, but oh well.
Thanks again for your help.
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