I'm writing a Ruby extension, for which I have a standard mkmf configuration script, but I need to add a special include flag (--std=c++0x
) to all of the C++ compilation steps. I don't want it in the C compilation steps, 'cause it throws warnings. How should I do this?
require 'mkmf'
create_makefile('thing')
For instance, I tried $CXXFLAGS << '-I..'
, but CXXFLAGS isn't defined, yet. If I use $CXXFLAGS = '-I..'
, it's just overwritten later.