[Scons-users] Out of project tree builds
Evan Driscoll
driscoll at cs.wisc.edu
Mon Oct 29 13:36:08 EDT 2012
On 10/29/2012 11:07 AM, Managan, Rob wrote:
> Hi there,
>
> Personally I like the approach of moving up one directory and then
> building alongside the sources; similar to Luc Bourhis suggestion.
>
> Project
> Sconstruct
> build1/
> build2/
> src/
> SConscript
>
> That way I can build for different platforms, opt, debug,…. With one
> Sconstruct file…
FWIW, when someone used to the autotools or Cmake or probably a couple
other tools talk about an out-of-tree build, there may be *no* relation
between the source location and build directory. You always see people
talk about the "./configure && make && make install" sequence, but you
could just as easily have a read-only source tree in /shared/libblah and
then from /tmp run "/shared/libblah/configure && make && make install".
(Everything isn't *quite* as clean as I make it out to be there, but
from what I know, it's close.)
Furthermore, the build script needs to have absolutely no knowledge of
what the build dir will be or what it will be named: to get similar
behavior with SCons, you need to explicitly code up some support,
perhaps looking at the invocation directory, perhaps adding a BUILD_DIR
variable to the command line or something like that. My impression is
that with autoconf and cmake, out-of-tree builds are supported for free.
I personally don't find much need for this sort of thing (and prefer the
fact that SCons makes building multiple variants easier), but I can
imagine that some people would.
Evan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 554 bytes
Desc: OpenPGP digital signature
Url : <http://four.pairlist.net/pipermail/scons-users/attachments/20121029/6d94655e/attachment.pgp>
More information about the Scons-users
mailing list