Top Level Namespace

Defined Under Namespace

Modules: NuLin Classes: NArray, NMatrix, NVector

Instance Method Summary collapse

Instance Method Details

#narray_gem_dirObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'ext/extconf.rb', line 4

def narray_gem_dir
  begin
    require 'rubygems'
  rescue LoadError
    return
  end
  
  begin
    spec = Gem::Specification.find_by_name("narray")
    $CPPFLAGS += " -I#{spec.full_gem_path}"
    return
  rescue Gem::LoadError, NoMethodError
  end
  
  spec = Gem.source_index.find_name("narray")
  if spec.any?
    $CPPFLAGS += " -I#{spec.last.full_gem_path}"
  end
end