Hom's Blog


Sublime编译build设置

配置文件 : 使用 JsoN 百度百科 编写

Build系统:

参考说明: 中文版,英文版 非官方文档 C++自带版本:

{
	"cmd": ["g++", "${file}", "-o", "${file_path}/${file_base_name}"],
	"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
	"working_dir": "${file_path}",
	"selector": "source.c, source.c++",

	"variants":
	[
		{
			"name": "Run",
			"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
		}
	]
}

gfortran version

{
     "cmd": ["gfortran", "-g", "-Wall", "${file}", "-o", "${file_path}/${file_base_name}"],
     "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
     "working_dir": "${file_path}",
     "selector": "source.f, source.f90",
     "shell": true,
     "variants":
     [
          {
               "name": "Run",
               //"cmd": [ "start", "${file_path}/${file_base_name}.exe"]
               "cmd" : ["${file_path}/${file_base_name}"]
          }
     ]
}

ifort in window64 version

{
	"cmd": ["cmd", "/E:on", "/V:on", "/K", "ipsxe-comp-vars.bat intel64 vs2010 && ifort ${file} -o ${file_path}/${file_base_name}"],
     "file_regex": "^.*\\\\([0-9A-Za-z_]+\\.[A-Za-z0-9]+)\\(([0-9]+)\\):[ ]+error[ ]+#([0-9]+):[ ]+(.*)$",
     "working_dir": "${file_path}",
     "selector": "source.f, source.f90,source.for,source.fortran90",
    "encoding":"cp936",
     //add the IVF path as follow to run the ipsxe-comp-vars.bat
      "path":"C:\\Program Files (x86)\\Intel\\Composer XE 2013\\bin;${path}",
     "variants":
     [
          {
               "name": "Run",
               //"cmd": ["cmd", "/e:on", "/v:on", "/c", "ipsxe-comp-vars intel64 vs2010 && ifort ${file} && ${file_base_name}"]
               "cmd" : ["${file_path}/${file_base_name}"]
          }
     ]
}


◆ 本文地址: http://platinhom.github.io/2015/06/21/sublime-build/, 转载请注明 ◆

前一篇: Sublime2&3 基础使用
后一篇: Sublime-Markdown-Github联合使用


Contact: Hom / 已阅读()
Source 类别: IT  标签: IDE  Software