Boost logo

Boost-Build :

Subject: Re: [Boost-build] make more than one target with one custom command
From: Vladimir Prus (vladimir.prus_at_[hidden])
Date: 2015-09-29 08:16:34


On 29-Sep-15 2:46 PM, Roman Matsybora wrote:
> This example invokes 2 actions for 2 targets
> What if 1 action makes 2 targets?

In that case, create 1 action object, and create 2 targets, passing the same action object to both, something like:

        local a = [ new action $(sources[1])
                   : common.copy : $(property-set) ] ;
         local t = [ new file-target $(name) : CPP : $(project)
                   : $(a) ] ;
         local t2 = [ new file-target $(name)_server : CPP : $(project)
                       : $(a) ] ;
         return [ virtual-target.register $(t) ] [ virtual-target.register $(t2) ] ;

Just replace 'common.copy' with something that actually produces two outputs.

- 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