add -j command-line option to set number of threads

This commit is contained in:
Josh Holtrop 2017-05-19 11:38:42 -04:00
parent 5cef9896ac
commit 2d8e08b493

View File

@ -35,6 +35,10 @@ module Rscons
rsconsfile = f rsconsfile = f
end 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 opts.on_tail("--version", "Show version") do
puts "Rscons version #{Rscons::VERSION}" puts "Rscons version #{Rscons::VERSION}"
exit 0 exit 0