[Scons-users] Determining number of build processes within scons

Marc Branchaud marcnarc at xiplink.com
Wed Dec 5 09:47:12 EST 2012


On 12-12-04 11:46 PM, Daniel Russel wrote:

> Our scons scripts run some other types of build systems as part of our

> build process (in the initial dependency testing part). It would be nice

> to have the number of process used by them match the argument passed with

> "-j" to scons. However, I can't find a way to get at that information. Can

> that be extracted from within a SConscript file? Thanks.


GetOption('num_jobs')

Beware the multiplier effect: Running "scons -j 4" and passing "-j 4" to 4
sub-builds, for example as "make -j 4", gives you 16 simultaneous build
processes.

We've had better results limiting the multiple-process support to just SCons,
and having each job that SCons runs be single-process.

YMMV, of course.

M.


More information about the Scons-users mailing list