class Object

Constants

N

#<RDoc::Comment:0x007f8ca9b24ac0>


#<RDoc::Comment:0x007f8caacb3c78>

Public Instance Methods

gplusplus_version() click to toggle source
# File ext/nmatrix_lapacke/extconf.rb, line 127
def gplusplus_version
  cxxvar = proc { |n| %x`#{CONFIG['CXX']} -E -dM - </dev/null | grep #{n}`.chomp.split(' ')[2] }
  major = cxxvar.call('__GNUC__')
  minor = cxxvar.call('__GNUC_MINOR__')
  patch = cxxvar.call('__GNUC_PATCHLEVEL__')

  raise("unable to determine g++ version (match to get version was nil)") if major.nil? || minor.nil? || patch.nil?

  "#{major}.#{minor}.#{patch}"
end