Boost logo

Boost-Build :

Subject: Re: [Boost-build] Issue running bjam with multiple jobs and custom code generator
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-11-07 14:07:55


AMDG

On 11/06/2016 03:02 AM, Christophe B. wrote:
>
>> I'm not sure exactly where the problem is, but there
>> are a couple of issues I can see with protoc.jam:
>> - The generator should list both H and CPP as its outputs.
>
> I thought that was the purpose of the following lines:
> local targets ;
> targets += [ new file-target $(name:B).pb : H :
> $(project) : $(action) ] ; # <------------ H
> targets += [ new file-target $(name:B).pb.cc exact : CPP
> : $(project) : $(action) ] ; # <----------- CPP
>
> <snip>
>

I thought that this should be enough for
your purposes too.

>> - override generated-targets instead of run and
>
> Not sure to follow you here. Do you mean that I should override another
> method from generator. If yes, is there some examples I could follow?
>

  I've attached an example generator that
creates both CPP and H targets. This
seems to work correctly for me. Running
with -j4 works and -d+12 shows that the
header dependency is correctly detected.

>
> <snip>
>
> I also found another implementation of protobuf generator:
> http://lipingworkshop.blogspot.com/2012/01/boostbuild-bjam-file-to-support-google.html
>
> I made some adaptations based on it, but I am not sure it is correct,
> but seems to work (hoping this is not by coincidence). It seems that
> adding the two lines DEPENDS solve the issue, but this is not clear to
> me. Do you have explanations to provide ?
>

This is definitely not the right approach.
I have no idea why it fixes the problem.

> <snip>
> DEPENDS all : [ $(target1).actualize ] ;
> DEPENDS all : [ $(target2).actualize ] ;
>
> <snip>
>

In Christ,
Steven Watanabe




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