Boost logo

Boost-Build :

Subject: Re: [Boost-build] Programmatically add to an alias?
From: Phillip Seaver (phil_at_[hidden])
Date: 2017-05-23 13:55:58


On 5/23/17 7:58 AM, Rene Rivera via Boost-build wrote:
> On Tue, May 23, 2017 at 2:12 AM, John Maddock via Boost-build
> <boost-build_at_[hidden] <mailto:boost-build_at_[hidden]>> wrote:
>
> Can I declare an alias and then add targets to it?
>
> I create run tartgets in a loop, and I'd like to be able to add
> them all to an alias if possible.
>
>
> I don't know of the top of my head.. But can you add the targets to a
> list in the loop and then create the alias with the list after the loop?

I've done that a few times. Something like:

local exes ;
for local s in [ glob progs/*.c ] {
    exe $(s:B) : $(s) ;
    exes += $(s:B) ;
}
alias executables : $(exes) ;

Phillip


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