当前,我正在使用自定义task.json文件在Linux中编译和运行c和c ++代码 '''
{
"version": "2.0.0",
"tasks": [
{
"label": "PIYUSH Compiler",
"type": "shell",
"command": "g++",
"args": [
"-g",
"${relativeFile}",
"-o",
"${fileBasenameNoExtension}.out",
"&&",
"clear",
"&&",
"./${fileBasenameNoExtension}.out"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceRoot}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
]
}
'''
现在有一个Sublime文本的构建文件: '''
{
"shell_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",
"shell_cmd": "python3 /home/piyush/Documents/CPHelper/Main.py\"${file_path}/${file_base_name}\""
}
]
}
'''
我希望JSON文件将我的自定义task.json文件和此高级文本生成文件合并到一个task.json文件中
如何做到?