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 257
    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 268
def check!
  super or raise "Macro not defined: #@name."
end
compile(t) click to toggle source
# File lib/autorake/definition.rb, line 264
def compile t
  c = Preprocessor.new @config.incdirs, @config.macros, "-w"
  c.cc t.cpp, t.src
end