Sha256: b3132904b46964ad4eacf2ba96a6ef7130e1e2d3f6dd5c9b1d88f3e82917ea1c

Contents?: true

Size: 1.39 KB

Versions: 5

Compression:

Stored size: 1.39 KB

Contents

require 'mkmf'
eigen3_opt = dir_config('eigen')
have_library("c++") or have_library("stdc++")

unless eigen3_opt[0]
  eigen3_path = File.join( File.dirname(File.expand_path(__FILE__)), "eigen3")
  $CXXFLAGS = ($CXXFLAGS || "") + " -I#{eigen3_path} "
end

$CXXFLAGS = ($CXXFLAGS || "") + " -O2 -Wall "
create_makefile('eigen/eigen')


# a monkey patch to make cc_command into cxx_command
# module MakeMakefile
#   def cc_command(opt="")
#     conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote, 'srcdir' => $srcdir.quote,
#                                   'arch_hdrdir' => $arch_hdrdir.quote,
#                                   'top_srcdir' => $top_srcdir.quote)
#     RbConfig::expand("$(CXX) #$INCFLAGS #$CPPFLAGS #$CXXFLAGS #$ARCH_FLAG #{opt} -c #{CONFTEST_C}",
#                      conf)
#   end
# end

# guess where eigen3 headers unless --with-eigen-include given.

# unless eigen3_opt[0]
#   case RbConfig::CONFIG["includedir"]
#   when /(.*)Cellar\/ruby((?!Cellar).)+\z/   # Homebrew
#     eigen3_path = File.join($1, "include/eigen3")
#   when "/usr/local/include"                 # Ubuntu
#     eigen3_path = "/usr/include/eigen3"
#   else                                      # MacPorts?
#     eigen3_path = File.join(RbConfig::CONFIG["includedir"], "eigen3")
#   end

#   if try_compile("#include <Eigen/Core>", "-I" + eigen3_path)
#       $CXXFLAGS = ($CXXFLAGS || "") + " -I#{eigen3_path} "
#   end
# end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ruby-eigen-0.0.11 ext/eigen/extconf.rb
ruby-eigen-0.0.11.pre2 ext/eigen/extconf.rb
ruby-eigen-0.0.11.pre1 ext/eigen/extconf.rb
ruby-eigen-0.0.10 ext/eigen/extconf.rb
ruby-eigen-0.0.10.pre1 ext/eigen/extconf.rb