diff options
author | Moritz Wundke <b.thax.dcg@gmail.com> | 2014-03-08 18:50:24 +0100 |
---|---|---|
committer | Moritz Wundke <b.thax.dcg@gmail.com> | 2014-03-08 18:50:24 +0100 |
commit | f1b1a38af95c28e8b08e97ca25cc7cf638ef6da3 (patch) | |
tree | 73564861ac40b79be1113a087fe2fd8b67d3607d | |
parent | 1fd08ad1ac543830bc908d5caa34d7f5371b26c1 (diff) |
Do not set number of jobs if already specified
-rw-r--r-- | SConstruct | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct index 2b83cb67cf..a9739ca604 100644 --- a/SConstruct +++ b/SConstruct @@ -9,10 +9,13 @@ import methods import multiprocessing # Enable aggresive compile mode if building on a multi core box -if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes': +# only is we have not set the number of jobs already or we do +# not want it +if ARGUMENTS.get('spawn_jobs', 'yes') == 'yes' and \ + int(GetOption('num_jobs')) <= 1: NUM_JOBS = multiprocessing.cpu_count() if NUM_JOBS > 1: - SetOption('num_jobs', multiprocessing.cpu_count()+1) + SetOption('num_jobs', NUM_JOBS+1) methods.update_version() |