Boost logo

Boost-Build :

Subject: Re: [Boost-build] Programmatically add to an alias?
From: John Maddock (jz.maddock_at_[hidden])
Date: 2017-05-23 15:35:26


On 23/05/2017 14:55, Phillip Seaver via Boost-build wrote:
> 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) ;

Works a treat, thanks! John.

---
This email has been checked for viruses by AVG.
http://www.avg.com

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