lib/blocks/compile.rb in bake-toolkit-2.51.2 vs lib/blocks/compile.rb in bake-toolkit-2.52.0
- old
+ new
@@ -45,11 +45,11 @@
module Blocks
class Compile < BlockBase
- attr_reader :objects, :include_list
+ attr_reader :objects, :include_list, :source_files_ignored_in_lib
def mutex
@mutex ||= Mutex.new
end
@@ -524,18 +524,19 @@
raise SystemCommandFailed.new
end
end
end
@object_files[source] = object
- @objects << object
+ @objects << object unless @source_files_ignored_in_lib.include?(source)
end
end
end
def calcSources(cleaning = false, keep = false)
return @source_files if @source_files and not @source_files.empty?
@source_files = []
+ @source_files_ignored_in_lib = []
exclude_files = Set.new
@config.excludeFiles.each do |pr|
Dir.glob_dir(pr.name, @projectDir).each {|f| exclude_files << f}
end
@@ -557,10 +558,11 @@
res.each do |f|
next if exclude_files.include?(f)
next if source_files.include?(f)
source_files << f
@source_files << f
+ @source_files_ignored_in_lib << f if sources.compileOnly
end
end
if Bake.options.filename
@source_files.keep_if do |source|
@@ -589,10 +591,10 @@
@source_files << f
end
end
end
- @source_files
+ return @source_files
end
def calcIncludesInternal(block)
# puts "#{block.projectName},#{block.configName} " + block.to_s
noDeps = @blocksRead.include?(block)
\ No newline at end of file