Commit a2e0c6ea authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #1592 from perlun/auto-toolchain

Automatically detect toolchain if it is visualcpp, and hence we drop vs2010.rake altogether - it’s no longer needed.
parents cfd97503 172cd281
MRuby::Build.new do |conf| MRuby::Build.new do |conf|
# load specific toolchain settings # load specific toolchain settings
toolchain :gcc
# Gets set by the VS command prompts.
if ENV['VisualStudioVersion']
toolchain :visualcpp
else
toolchain :gcc
end
# Use mrbgems # Use mrbgems
# conf.gem 'examples/mrbgems/ruby_extension_example' # conf.gem 'examples/mrbgems/ruby_extension_example'
......
MRuby::Toolchain.new(:vs2012) do |conf| MRuby::Toolchain.new(:visualcpp) do |conf|
[conf.cc, conf.cxx].each do |cc| [conf.cc, conf.cxx].each do |cc|
cc.command = ENV['CC'] || 'cl.exe' cc.command = ENV['CC'] || 'cl.exe'
cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /D_DEBUG /MDd /Zi /Od /RTC1 /DHAVE_STRING_H /DNO_GETTIMEOFDAY /D_CRT_SECURE_NO_WARNINGS)] cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /D_DEBUG /MDd /Zi /Od /RTC1 /DHAVE_STRING_H /DNO_GETTIMEOFDAY /D_CRT_SECURE_NO_WARNINGS)]
......
MRuby::Toolchain.new(:vs2010) do |conf|
toolchain :vs2012
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment