From 67f7fe5e5c210f42fd3c27809a97245b4eb242f9 Mon Sep 17 00:00:00 2001 From: Rasmus Andersson Date: Sun, 27 Jun 2010 13:51:39 +0200 Subject: [PATCH] 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 --- wscript | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wscript b/wscript index 6a5726c794..b6f8380696 100644 --- a/wscript +++ b/wscript @@ -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