Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-02-02 02:35:39


Zbynek Winkler wrote:

> IMHO reintroducing the main target directories would bring more problems
> than it would solve. It is true that it would work for this example but I
> think it would solve only the symptoms and not the cause. I think it would
> be wrong to expect that the following would work:
>
> obj objfoo : foo.cpp : <define>FOO ;
> obj objfoo : foo.cpp : <define>BAR ;
>
> That is really what your Jamfile is requesting. The result of this has to
> differ either in path or in name. Creating directory for objfoo would not
> work in this case because the target would still be objfoo/foo.obj in both
> cases.
>
> But I am sure Volodya will be able to answer this much better :-)

Oh, actually, Zbynek has explained it much better that I could. The only thing
I can add is easy to another way to add extra path element to one of objects:

exe foo : $(SOURCES).cpp : <define>FOO <location-prefix>main-target-foo ;
exe bar : $(SOURCES).cpp : <define>BAR ;

This clearly say that you really want to compile the same file twice. Well...
I need to declare 'location-prefix' in builtin.jam, not testing.jam.... done,
the example above is tested and works.

- Volodya

 


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