Ros_Qt5_Gui_App/.vscode/tasks.json
2021-05-21 16:37:08 +08:00

31 lines
1.3 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
// https://code.visualstudio.com/docs/editor/tasks
"version": "2.0.0",
"tasks": [
{
"label": "Build", // 任务的名字叫Build注意是大小写区分的等会在launch中调用这个名字
"type": "shell", // 任务执行的是shell命令也可以是
"command": "g++", // 命令是g++
"args": [
"'-Wall'",
"'-std=c++17'", //使用c++17标准编译
"'${file}'", //当前文件名
"-o", //对象名,不进行编译优化
"'${fileBasenameNoExtension}.exe'", //当前文件名(去掉扩展名)
],
// 所以以上部分就是在shell中执行假设文件名为filename.cpp
// g++ filename.cpp -o filename.exe
"group": {
"kind": "build",
"isDefault": true
// 任务分组因为是tasks而不是task意味着可以连着执行很多任务
// 在build组的任务们可以通过在Command Palette(F1) 输入run build task来运行
// 当然如果任务分组是test你就可以用run test task来运行
},
"problemMatcher": [
"$gcc" // 使用gcc捕获错误
],
}
]
}