Subject: Re: [Boost-build] Alias requirements?
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2010-11-29 04:17:38
Vladimir Prus wrote:
> On Monday, November 29, 2010 10:53:17 Gevorg Voskanyan wrote:
> > I feel I must be missing something obvious, but are alias requirements
> > supposed to work? Consider this simple case:
> > alias src : a.cpp b.cpp : <define>FOO ;
> This says:
> Whenever somebody asks for 'src', take metargets a.cpp and b.cpp, and
> generate them with <define>FOO, then return result.
> However, given that a.cpp and b.cpp are source files, generating them merely
> creates targets, and <define>FOO is not used in any way.
I *think* I see what you mean, however the following variation confuses things
for me again:
obj a : a.cpp ;
obj b : b.cpp ;
alias src : a b : <define>FOO ;
As far as I understand, this time 'a' and 'b' are proper metatargets, and
generating them with <define>FOO should work. But I just tried it and
<define>FOO wasn't present this time either.
> > exe e : main.cpp src ;
> > Here both a.cpp and b.cpp get built without FOO being defined. Changing
> > 'alias' with 'lib' fixes the things and causes FOO to be properly defined
> > for a.cpp and b.cpp.
> Yes, because in that case, <define>FOO applies to the 'lib' target, and 'lib'
> target can make some use of it.
> Does this clarifies things?
> Vladimir Prus
> Boost.Build: http://boost.org/boost-build2
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