Compiling .proto files with scons

454 views
Skip to first unread message

Thomas Johnson

unread,
Nov 23, 2009, 5:14:36 AM11/23/09
to Protocol Buffers
Sorry if this is a bit of a newbie question, but I'm new to both
protobuffers and scons. What's the easiest way to get .proto files to
compile to .pb.cc and .pb.h files? I know you guys use scons at
google, so I'm hoping that there's a cut-and-paste solution - but if
now, can someone recommend where to look to figure it out?

Kenton Varda

unread,
Nov 23, 2009, 12:20:52 PM11/23/09
to Thomas Johnson, Protocol Buffers
Actually, most of Google does not use scons.  I've never used it myself.  We mostly use an in-house build system full of Google-specific hacks -- like how to build protocol buffers.

But it can't be that hard to get scons to run a shell command, can it?


--

You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To post to this group, send email to prot...@googlegroups.com.
To unsubscribe from this group, send email to protobuf+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/protobuf?hl=.



Thomas Johnson

unread,
Nov 23, 2009, 10:07:23 PM11/23/09
to Protocol Buffers
Sorry, I thought I had read in an interview somewhere that you guys
were using scons internally. And I actually can get scons to run
protoc, I'm just having trouble getting it to read the .proto files
from the right source directories and write the .pb.cc and .pb.h files
to the right build directories. If there's not a cut-n-paste solution
that folks here know about, I'll move this question to a scons
discussion group.

Scott Stafford

unread,
Dec 9, 2009, 2:38:28 PM12/9/09
to Protocol Buffers
Check out the SCons wiki, I just put up a SCons Builder that should
help you.

http://www.scons.org/wiki/ProtocBuilder

Scott

On Nov 23, 10:07 pm, Thomas Johnson <thomas.j.john...@gmail.com>
wrote:
> Sorry, I thought I had read in an interview somewhere that you guys
> were usingsconsinternally. And I actually can getsconsto run
> protoc, I'm just having trouble getting it to read the .proto files
> from the right source directories and write the .pb.cc and .pb.h files
> to the right build directories. If there's not a cut-n-paste solution
> that folks here know about, I'll move this question to ascons
> discussion group.
>
>
>
> On Tue, Nov 24, 2009 at 2:20 AM, Kenton Varda <ken...@google.com> wrote:
> > Actually, most of Google does not usescons.  I've never used it myself.  We
> > mostly use an in-house build system full of Google-specific hacks -- like
> > how to build protocol buffers.
> > But it can't be that hard to getsconsto run a shell command, can it?
>
> > On Mon, Nov 23, 2009 at 2:14 AM, Thomas Johnson <thomas.j.john...@gmail.com>
> > wrote:
>
> >> Sorry if this is a bit of a newbie question, but I'm new to both
> >> protobuffers andscons. What's the easiest way to get .proto files to
Reply all
Reply to author
Forward
0 new messages