[Scons-users] SCons code generation (e.g. protobuf) and VariantDir

Vinnie Falco vinnie at ripple.com
Sun May 4 18:48:19 EDT 2014


Dirk:

Thanks for getting back to me. We don't use a hierarchical build (just
the SConstruct) so I'm not sure how passing variant_dir would be
applicable or doable. In the replies on StackOverflow, "UncleZeiv"
alludes to this list post:
http://scons.tigris.org/issues/show_bug.cgi?id=2908

The replies there exactly describe the problem. And they show how the
VariantDir call effectively does nothing. When I run scons with
--tree=all it is clear that the pb.cc file does not depend on the
.proto or protoc.exe.

What I am wondering is if any progress has been made on this front,
because the latest version of SCons still has this problem.

Thanks


On Sun, May 4, 2014 at 3:33 PM, Dirk Bächle <tshortik at gmx.de> wrote:

> 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

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users



More information about the Scons-users mailing list