Sha256: 3984b923d61b2d6c36f375e73aeb24c8e646d837034aab2e8d7dc0b7125ef9e1

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

require "mkmf-rice"

$CXXFLAGS += " -std=c++17 $(optflags) -DEIGEN_MPL2_ONLY"

unless ENV["RUBY_CC_VERSION"]
  # AVX-512F not support yet
  # https://github.com/bab2min/tomotopy/issues/188
  $CXXFLAGS << " " << with_config("optflags", "-march=native -mno-avx512f")
end

apple_clang = RbConfig::CONFIG["CC_VERSION_MESSAGE"] =~ /apple clang/i

if apple_clang
  # silence rice warnings
  $CXXFLAGS += " -Wno-deprecated-declarations"
else
  # silence eigen warnings
  $CXXFLAGS += " -Wno-ignored-attributes -Wno-deprecated-copy"
end

# silence tomoto warnings
$CXXFLAGS += " -Wno-unused-variable -Wno-switch"

ext = File.expand_path(".", __dir__)
tomoto = File.expand_path("../../vendor/tomotopy/src/TopicModel", __dir__)
eigen = File.expand_path("../../vendor/eigen", __dir__)
eigen_rand = File.expand_path("../../vendor/EigenRand", __dir__)
variant = File.expand_path("../../vendor/variant/include", __dir__)

$srcs = Dir["{#{ext},#{tomoto}}/*.cpp"]
$INCFLAGS += " -I#{tomoto} -I#{eigen} -I#{eigen_rand} -I#{variant}"
$VPATH << tomoto

create_makefile("tomoto/tomoto")

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tomoto-0.3.0-x86_64-linux ext/tomoto/extconf.rb
tomoto-0.3.0-x86_64-darwin ext/tomoto/extconf.rb
tomoto-0.3.0 ext/tomoto/extconf.rb