Method: Magica::Command::Compiler#combine_flags

Defined in:
lib/magica/commands/compiler.rb

#combine_flags(defines = [], include_paths = [], flags = []) ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/magica/commands/compiler.rb', line 22

def combine_flags(defines = [], include_paths = [], flags = [])
  define_flags = [
    @defines, defines
  ].flatten.map { |define| @option_defines % define }
  include_path_flags = [
    @include_paths, include_paths
  ].flatten.map do |include_path|
    @option_include_path % filename(include_path)
  end
  [define_flags, include_path_flags, flags].flatten.uniq.join(' ')
end