add verbose CLI option to set Environment default echo mode - close #70

This commit is contained in:
josh committed 2019-01-01 16:15:22 -05:00
1 parent eaac473f44
commit 918c629435
4 files changed
+40 -1

No files matched your search

+4
View File
@@ -11,6 +11,10 @@ module Rscons
# The number of threads to use when scheduling subprocesses.
attr_accessor :n_threads
# @return [Boolean]
# Whether to run verbosely.
attr_accessor :verbose
# @return [VarSet]
# Access any variables set on the rscons command-line.
attr_reader :vars
+5
View File
@@ -8,6 +8,7 @@ Global options:
--version Show rscons version and exit
-h, --help Show rscons help and exit
-r COLOR, --color=COLOR Set color mode (off, auto, force)
-v, --verbose Run verbosely
Operations:
configure Configure the project
@@ -78,6 +79,10 @@ module Rscons
end
end
opts.on("-v", "--verbose") do
Rscons.application.verbose = true
end
opts.on("--version") do
puts "Rscons version #{Rscons::VERSION}"
exit 0
+8 -1
View File
@@ -81,7 +81,14 @@ module Rscons
add_builder(builder_class.new)
end
end
@echo = options[:echo] || :short
@echo =
if options[:echo]
options[:echo]
elsif Rscons.application.verbose
:command
else
:short
end
@build_root = "#{Cache.instance.configuration_data["build_dir"]}/e.#{@id}"
if block_given?