views:

489

answers:

3

Each project using SCons seems to be reinventing the wheel. I would be glad to take someones directory layout, and/or solution for variant builds(debug/release), and/or testing framework, and/or best practices.

Even several not-too-simple examples would help.

+5  A: 

The SCons Recipes in the wiki is a good place to start. In addition take a look at other projects which use SCons, e.g. the Ardour build system. If that doesn't cut it, there are a few third party SCons extensions you may want to take a look at:

To the best of my knowledge, there are no SCons best practices which were agreed upon. The SCons community seems to favor adaptability over "canonicalization". It is not hard to design a decent SCons-based build system from scratch, though. (Once you have understood how VariantDir works, at least.)

Pankrat
You might be right. But one have to know that VariantDir is the command you need. Also It was terribly hard to find the crucial fact that "#" in front of path is what I need.
Łukasz Lew
Really useful links. Thanks
Łukasz Lew
Why is VariantDir so important? Documentation on this function is rather scarse
Łukasz Lew
Eventually, you may want to separate multiple build variants and that's when VariantDir comes into play. Many people also use it to set up their build directory, therefore it's widely used. In practice, VariantDir is powerful but not very intuitive. Concerning documentation: The man-page is your friend.
Pankrat
Interesting to see that Ardour has switched to Waf recently. Paul Davis went into a bit more detail as to why on FLOSS weekly 86 http://twit.tv/floss86
rq
+6  A: 

You may be interested in Google's Software Construction Toolkit that was made open source in February 2009. It adds new features on top of SCons, such as improved Visual Studio project file generation, unit test functions, and distributed builds with distcc or incredibuild.

rq
That's a big answer. Thanks!Are you using it?
Łukasz Lew
Not yet, as it is still very new (outside Google - they have been using it in Chrome for a while it seems).
rq
+1  A: 

If you are using Eclipse for C++ development you may want to check out this SCons builder plugin (http://nic-nac-project.org/~lothar/eclipse/update/SConsBuilderPlugin.html)

lothar