Method: Xot::Rake#cxxflags

Defined in:
lib/xot/rake/util.rb

#cxxflags(warnings = true) ⇒ Object



254
255
256
257
258
259
# File 'lib/xot/rake/util.rb', line 254

def cxxflags(warnings = true)
  cflags   = env :CFLAGS,   RbConfig::CONFIG['CFLAGS']
  cxxflags = env :CXXFLAGS, RbConfig::CONFIG['CXXFLAGS']
  cflags   = cflags.gsub(/-W[\w\-\=]+/, '') + ' -w' unless warnings
  make_cflags "#{cflags} #{cxxflags}"
end