class Autorake::CheckMacro

Constants

TYPE

Private Instance Methods

build_source() click to toggle source
Calls superclass method Autorake::CheckWithHeaders#build_source
# File lib/autorake/definition.rb, line 243
    def build_source
      super << <<-SRC
#ifndef #@name
#error not defined
#endif
      SRC
    end
check!() click to toggle source
Calls superclass method Autorake::Check#check!
# File lib/autorake/definition.rb, line 254
def check!
  super or raise "Macro not defined: #@name."
end
compile(t) click to toggle source
# File lib/autorake/definition.rb, line 250
def compile t
  c = Preprocessor.new @config.incdirs, @config.macros, "-w"
  c.cc t.cpp, t.src
end