Sha256: 50a5cc363dee704087487c5c7331a7900a12ddbc2ec5b3b3a1d82205a33385fb

Contents?: true

Size: 1.14 KB

Versions: 7

Compression:

Stored size: 1.14 KB

Contents

require 'mkmf'
gem_path = nil

if Gem.respond_to?(:find_files) and Gem.find_files("narray.h").length > 0
  require "rbconfig"
  so = RbConfig::CONFIG["DLEXT"]
  narray_include = File.expand_path(File.dirname(Gem.find_files("narray.h")[0]))
  narray_lib = File.expand_path(File.dirname(Gem.find_files("narray." + so)[0]))
else
  gem_home=(`gem environment GEM_HOME`).chomp
  narray_dir = Dir.glob("#{gem_home}/gems/narray-*/ext/narray").sort[-1]
  if narray_dir
    narray_include = narray_lib = narray_dir
  else
    narray_include = narray_lib = [ $sitearchdir, $vendorarchdir]
  end
end
dir_config('narray', narray_include, narray_lib)

require "narray"
if NArray.const_defined?(:SUPPORT_BIGMEM) && NArray::SUPPORT_BIGMEM

  case RbConfig::CONFIG["CC"]
  when "gcc"
    omp_opt = "-fopenmp"
  else
    omp_opt = nil
  end
  omp_opt = arg_config("--openmp", omp_opt)

  omp_opt = nil if omp_opt.to_s.empty?

  if omp_opt
    $CFLAGS << " " << omp_opt
    $DLDFLAGS << " " << omp_opt
    warn "OpenMP support: ON"
  else
    warn "OpenMP support: OFF"
    warn "if you want to enable openmp, set --openmp=compile_option"
  end
end

create_makefile('numru/gphys_ext')

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gphys-1.5.6 ext/numru/gphys/extconf.rb
gphys-1.5.5 ext/numru/gphys/extconf.rb
gphys-1.5.4 ext/numru/gphys/extconf.rb
gphys-1.5.3 ext/numru/gphys/extconf.rb
gphys-1.5.2 ext/numru/gphys/extconf.rb
gphys-1.5.1 ext/numru/gphys/extconf.rb
gphys-1.5.0 ext/numru/gphys/extconf.rb