- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-1.3.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-1.3.0/tasks/toolchains/visualcpp.rake
r321 r331 1 MRuby::Toolchain.new(:visualcpp) do |conf |1 MRuby::Toolchain.new(:visualcpp) do |conf, _params| 2 2 conf.cc do |cc| 3 3 cc.command = ENV['CC'] || 'cl.exe' 4 cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /utf-8 /W4 /GS /analyze- /Zc:wchar_t /ZI /Gm /Od /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MDd /EHsc /DWIN32 /D_DEBUG /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS)] 5 cc.flags << %w(/we4002 /we4003 /we4005 /we4007 /we4010 /we4013 /we4015 /we4020 /we4022 /we4024 /we4028 /we4029 /we4031 /we4033 /we4034 /we4042 /we4047 /we4048 /we4049 /we4056 /we4067 /we4074 /we4079 /we4083 /we4088 /we4089 /we4090 /we4091 /we4094 /we4096 /we4098 /we4099 /we4113 /we4133 /we4715 /we4716) 6 cc.flags << %w(/wd4214 /wd4100 /wd4996) 7 cc.flags << "/Fd\"#{conf.build_dir}\\vc140.pdb\"" 8 cc.flags << "/Fp\"%{outdir}\\%{outfilebase}.pch\"" 4 # C4013: implicit function declaration 5 cc.flags = [ENV['CFLAGS'] || %w(/c /nologo /W3 /we4013 /Zi /MD /O2 /utf-8 /D_CRT_SECURE_NO_WARNINGS)] 9 6 cc.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING) 10 7 cc.option_include_path = '/I%s' 11 8 cc.option_define = '/D%s' 12 9 cc.compile_options = "%{flags} /Fo%{outfile} %{infile}" 10 cc.cxx_compile_flag = '/TP' 11 cc.cxx_exception_flag = '/EHs' 13 12 end 14 13 15 14 conf.cxx do |cxx| 16 15 cxx.command = ENV['CXX'] || 'cl.exe' 17 cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /utf-8 /nologo /W4 /GS /analyze- /Zc:wchar_t /ZI /Gm /Od /Zc:inline /fp:precise /errorReport:prompt /WX- /Zc:forScope /RTC1 /Gd /Oy- /MDd /EHsc /DWIN32 /D_DEBUG /D_CONSOLE /D_CRT_SECURE_NO_WARNINGS)] 18 cxx.flags << %w(/we4002 /we4003 /we4005 /we4007 /we4010 /we4013 /we4015 /we4020 /we4022 /we4024 /we4028 /we4029 /we4031 /we4033 /we4034 /we4042 /we4047 /we4048 /we4049 /we4056 /we4067 /we4074 /we4079 /we4083 /we4088 /we4089 /we4090 /we4091 /we4094 /we4096 /we4098 /we4099 /we4113 /we4133 /we4715 /we4716) 19 cxx.flags << %w(/wd4214 /wd4100 /wd4996) 20 cxx.flags << "/Fd\"#{conf.build_dir}\\vc140.pdb\"" 21 cxx.flags << "/Fp\"%{outdir}\\%{outfilebase}.pch\"" 16 cxx.flags = [ENV['CXXFLAGS'] || ENV['CFLAGS'] || %w(/c /nologo /W3 /Zi /MD /O2 /EHs /utf-8 /D_CRT_SECURE_NO_WARNINGS)] 22 17 cxx.defines = %w(DISABLE_GEMS MRB_STACK_EXTEND_DOUBLING) 23 18 cxx.option_include_path = '/I%s' 24 19 cxx.option_define = '/D%s' 25 20 cxx.compile_options = "%{flags} /Fo%{outfile} %{infile}" 21 cxx.cxx_compile_flag = '/TP' 22 cxx.cxx_exception_flag = '/EHs' 26 23 end 27 24 … … 61 58 62 59 conf.file_separator = '\\' 60 61 if require 'open3' 62 Open3.popen3 conf.cc.command do |_, _, e, _| 63 if /Version (\d{2})\.\d{2}\.\d{5}/ =~ e.gets && $1.to_i <= 17 64 m = "# VS2010/2012 support will be dropped after the next release! #" 65 h = "#" * m.length 66 puts h, m, h 67 end 68 end 69 end 70 63 71 end
Note:
See TracChangeset
for help on using the changeset viewer.