编程开源技术交流,分享技术与知识

网站首页 > 开源技术 正文

ATOM编译运行build之atom-build.yml配置文档

wxchong 2024-08-22 03:46:18 开源技术 15 ℃ 0 评论

前提

在ATOM编辑器上安装 build 插件,配置文档中cmd所指的编译器或解释器路径在path中,atom-build.yml配置文档放在程序所在的project文件夹里,按F9在底部窗口察看运行结果。

直接解释的脚本语言配置,以cbrother为例。

cmd: "cbrother"

name: "/{FILE_ACTIVE_NAME_BASE}"

args:

- /{FILE_ACTIVE}

# - <argument2>

sh: true,

cwd: /{FILE_ACTIVE_PATH}

env:

# VARIABLE1: "VALUE1"

# VARIABLE2: "VALUE2"

errorMatch:

# - ^regexp1$

# - ^regexp2$

warningMatch:

# - ^regexp1$

# - ^regexp2$

#keymap: <ctrl-alt-k>

#atomCommandName: namespace:command

#targets:

# extraTargetName:

# cmd: "<command to execute>"

# args:

# (any previous options are viable here except `targets` itself)

编译后运行的编程语言,以g++为例

cmd: "g++"

name: "Compile and run g++ single program"

args:

- "{FILE_ACTIVE}"

- "-o {FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE} &&"

- "{FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE}"

sh: true,

cwd: /{FILE_ACTIVE_PATH}

env:

# VARIABLE1: "VALUE1"

# VARIABLE2: "VALUE2"

errorMatch:

- (?<file>[0-9a-zA-Z_]+\\.+[cC]):(?<line>\\d+):\\s+(?<message>.+)

# - ^regexp2$

warningMatch:

# - ^regexp1$

# - ^regexp2$

#keymap: <ctrl-alt-k>

#atomCommandName: "Run application in terminal"

#targets:

#extraTargetName:

#cmd: "./{FILE_ACTIVE_PATH}/{FILE_ACTIVE_NAME_BASE}"

# args:

# # (any previous options are viable here except `targets` itself)

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表