[Scons-users] SCons code generation (e.g. protobuf) and VariantDir
Dirk Bächle
tshortik at gmx.de
Sun May 4 18:33:59 EDT 2014
Hi Vinnie,
On 05.05.2014 00:15, Vinnie Falco wrote:
> I'm working on a project that uses SCons and protocol buffers from
> C++. I learned Python and SCons and added support for variant
> directories. But there's a problem, and one that it seems others have
> had.
>
> My SConstruct invokes a protoc builder on src/ripple.proto to produce
> build/proto/ripple.pb.cc and build/proto/ripple.pb.h. I use
> VariantDir('build/debug/proto', 'build/proto') to establish a variant
> (the real file has 12 variants). But when I call
> env.Object('build/debug/proto/ripple.pb.cc') SCons does not realize
> that it has to first call protoc and produces the error 'ripple.pb.cc
> required for ripple.pb.obj'.
>
> This problem is explained clearly in this old StackOverflow question,
> to which I have added a reputation bounty:
>
> http://stackoverflow.com/questions/16545459/scons-code-generation-and-variantdir
and have you tried Brady's suggestion to use the "variant_dir"
parameter, and how did that work out for you?
Best regards,
Dirk
More information about the Scons-users
mailing list