Permalink
Browse files

Use all available CPUs when building

Automatically set Options.options.jobs to the number of CPUs/cores on the
executing machine, unless the environment variable JOBS is set
  • Loading branch information...
1 parent bbdd61d commit 67f7fe5e5c210f42fd3c27809a97245b4eb242f9 @rsms rsms committed with ry Jun 27, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 wscript
View
@@ -19,6 +19,12 @@ blddir = 'build'
jobs=1
if os.environ.has_key('JOBS'):
jobs = int(os.environ['JOBS'])
+else:
+ try:
+ import multiprocessing
+ jobs = multiprocessing.cpu_count()
+ except:
+ pass
def set_options(opt):
# the gcc module provides a --debug-level option

0 comments on commit 67f7fe5

Please sign in to comment.