Subject: Re: [Boost-build] Generator's target build directory?
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-11-10 15:53:34
Alexander Sack wrote:
> On Mon, Nov 10, 2008 at 12:20 PM, Vladimir Prus <ghost_at_[hidden]> wrote:
>> On Monday 10 November 2008 18:34:15 Alexander Sack wrote:
>>> I am trying to create a simple generator for Google's protobuf tool
>>> which has the following syntax:
>>> protoc --cpp_out="<some directory>" <sourcefiles>
>>> This will turn:
>>> MyProtoBufs.proto --> MyProtoBufs.pb.cc and MyProtoBufs.pb.h
>>> My issues are:
>>> 1) I don't know what to put in <some directory> to bjam can pick up
>>> the resulting CPP source file so the corresponding compilation fails,
>>> i.e. can I get the current target build (this my main issue)
>> Assuming your generator is defined to accept PROTO targets, and generate CPP
>> and H targets, then inside the action associated with your generator you can use:
>> to get the directory where the target should be placed.
> Using the above I am to get the protoc create the pb.cc file in the
> right spot (thanks again) and then rename it by just issuing a copy
> command. However, now my issue is the generated header file, *.pb.h.
> Right now its in obviously a variant build directory. How the heck do
> I include this file in other targets? I'm thinking the simple
> generator model is not going to cut it because of this (so close too).
and make sure your generator declares "H" as out of outputs.
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