Boost logo

Boost-Build :

Subject: Re: [Boost-build] Alias requirements?
From: Vladimir Prus (ghost_at_[hidden])
Date: 2010-11-29 03:23:42


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.

> 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
http://vladimir_prus.blogspot.com
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