From 69e1e2736084e5c229cc6f8df5062fc82ee40e67 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 4 Apr 2009 18:55:37 +0000 Subject: [PATCH] Allow Boost.Build to override the value of -j. [SVN r52171] --- historic/jam/src/jam.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/historic/jam/src/jam.c b/historic/jam/src/jam.c index b68a9cb58..cbffb4765 100644 --- a/historic/jam/src/jam.c +++ b/historic/jam/src/jam.c @@ -476,6 +476,25 @@ int main( int argc, char * * argv, char * * arg_environ ) ++globs.noexec; } + /* The build system may set the PARALLELISM variable to override -j + options. */ + { + LIST *p = L0; + p = var_get ("PARALLELISM"); + if (p) + { + int j = atoi (p->string); + if (j == -1) + { + printf( "Invalid value of PARALLELISM: %s\n", p->string); + } + else + { + globs.jobs = j; + } + } + } + /* Now make target. */ { PROFILE_ENTER( MAIN_MAKE );