Top Level Namespace

Defined Under Namespace

Modules: U Classes: String

Instance Method Summary collapse

Instance Method Details

#try_compiler_option(opt, &block) ⇒ Object



103
104
105
106
107
108
109
110
111
112
# File 'ext/u/extconf.rb', line 103

def try_compiler_option(opt, &block)
  result = false
  checking_for "#{opt} option to compiler" do
    if result = try_cpp('', opt, &block)
      $CFLAGS += ' ' unless $CFLAGS.empty?
      $CFLAGS += opt
    end
  end
  result
end

#try_warning_option(opt, &block) ⇒ Object



119
120
121
122
123
124
125
126
127
128
# File 'ext/u/extconf.rb', line 119

def try_warning_option(opt, &block)
  result = false
  checking_for "#{opt} option to compiler" do
    if result = try_cpp('', opt, &block)
      $warnflags += ' ' unless $warnflags.empty?
      $warnflags += opt
    end
  end
  result
end