From 2d8e08b493de63246a06f34938d07c653ce87ebd Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 19 May 2017 11:38:42 -0400 Subject: [PATCH] add -j command-line option to set number of threads --- lib/rscons/cli.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rscons/cli.rb b/lib/rscons/cli.rb index 575754e..4776128 100644 --- a/lib/rscons/cli.rb +++ b/lib/rscons/cli.rb @@ -35,6 +35,10 @@ module Rscons rsconsfile = f end + opts.on("-j NTHREADS", "Use NTHREADS parallel jobs (local default #{Rscons.n_threads})") do |n_threads| + Rscons.n_threads = n_threads.to_i + end + opts.on_tail("--version", "Show version") do puts "Rscons version #{Rscons::VERSION}" exit 0