lib/blocks/compile.rb in bake-toolkit-2.57.0 vs lib/blocks/compile.rb in bake-toolkit-2.58.0
- old
+ new
@@ -559,10 +559,17 @@
end
if (sources.define.length > 0 or sources.flags.length > 0)
icf = integrateCompilerFile(Utils.deep_copy(@block.tcs),sources)
end
res.each do |f|
- @fileTcs[f] = icf if !@fileTcs.has_key?(f)
+ if @fileTcs.has_key?(f)
+ singleFile = res.length == 1 && res[0] == pr
+ if singleFile && icf
+ Bake.formatter.printWarning("Flags/Defines for '#{sources.name}' will be ignored", sources)
+ end
+ else
+ @fileTcs[f] = icf
+ end
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
\ No newline at end of file