shortcut Environment#process if @targets is empty

This commit is contained in:
Josh Holtrop 2014-04-15 14:04:59 -04:00
parent 160434b903
commit a2653a77d1

View File

@ -175,6 +175,7 @@ module Rscons
cache = Cache.instance cache = Cache.instance
cache.clear_checksum_cache! cache.clear_checksum_cache!
targets_processed = {} targets_processed = {}
unless @targets.empty?
process_target = proc do |target| process_target = proc do |target|
targets_processed[target] ||= begin targets_processed[target] ||= begin
@targets[target][:sources].each do |src| @targets[target][:sources].each do |src|
@ -199,6 +200,7 @@ module Rscons
end end
cache.write cache.write
end end
end
# Clear all targets registered for the Environment. # Clear all targets registered for the Environment.
def clear_targets def clear_targets