{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "No terminal CR",
"type": "shell",
"command": "g++ ${file} -o ${fileBasenameNoExtension} && ./${fileBasenameNoExtension} < f.in > f.out",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Terminal Compile",
"type": "shell",
"command": "gnome-terminal -x bash -c \"bash | g++ ${file} -o ${fileBasenameNoExtension}\"",
"presentation": {
"reveal": "never"
},
"group": "build",
"problemMatcher": []
},
{
"label": "No terminal CR -fsanitize",
"type": "shell",
"command": "g++ ${file} -o ${fileBasenameNoExtension} -fsanitize=address,undefined && ./${fileBasenameNoExtension} < f.in > f.out",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"group": "build"
},
{
"label": "No terminal CR O2",
"type": "shell",
"command": "g++ ${file} -o ${fileBasenameNoExtension} -O2 && ./${fileBasenameNoExtension} < f.in > f.out",
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"./"
],
"pattern": {
"regexp": "^(.*):([0-9]+):([0-9]+): (.*): (.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"echo": true,
"reveal": "never",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"group": "build"
}
]
}
标签:false,VScode,一键,fileBasenameNoExtension,编译,file,group,label,true
From: https://www.cnblogs.com/cdsidi/p/16705610.html