blob: 683db8c6338798314749c089795e972164e9f49a [file] [log] [blame]
{
// Note!
// You can set the value used for ${config:chrome.outputDir} in your settings.json
// file with a line like:
// "chrome.outputDir": "/path/to/chromium/src/out/Debug",
"version": "2.0.0",
"runner": "terminal",
// The default problem matcher matches build output, which is useful for most tasks.
"problemMatcher": [
{
"owner": "cpp",
"fileLocation": ["relative", "${config:chrome.outputDir}"],
"pattern": {
"regexp": "^(gen/.*):(\\d+):(\\d+):\\s+(warning|\\w*\\s?error):\\s+(.*)$",
"file": 1, "line": 2, "column": 3, "severity": 4, "message": 5
}
},
{
"owner": "cpp",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^../../(.*):(\\d+):(\\d+):\\s+(warning|\\w*\\s?error):\\s+(.*)$",
"file": 1, "line": 2, "column": 3, "severity": 4, "message": 5
}
},
{
"owner": "cpp",
"fileLocation": ["relative", "${config:chrome.outputDir}"],
"pattern": {
"regexp": "^(gen/.*?):(.*):\\s+(warning|\\w*\\s?error):\\s+(.*)$",
"file": 1, "severity": 3, "message": 4
}
},
{
"owner": "cpp",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp": "^../../(.*?):(.*):\\s+(warning|\\w*\\s?error):\\s+(.*)$",
"file": 1, "severity": 3, "message": 4
}
}
],
"options": {
// It's important to set the CWD to the output directory so that file paths
// are linked correctly in the terminal output.
"cwd": "${config:chrome.outputDir}"
},
"inputs": [
{
// See 'Set Chrome Output Directory'.
"type": "pickString",
"id": "chromeOutputDir",
"description": "Chrome output directory:",
// Configure this to point to all the output directories you use.
"options": [
"/path/to/chromium/src/out/pc",
"/path/to/chromium/src/out/Debug",
"/path/to/chromium/src/out/Debug_x86"
]
}
],
"tasks": [
// Set the Chrome output directory to be used in future task runs.
// This uses a symbolic link to remember the current output directory.
// If you want to use this, make sure chrome.outputDir is configured to
// point to the link created at ${workspaceFolder}/out/current_link.
// Alternatively:
// * If you want to be prompted for the output directory each
// time you run a command, replace
// ${config:chrome.outputDir}
// with
// ${input:chromeOutputDir}
// everywhere in this file.
//
// * If you want to have different tasks for different output directories,
// just create duplicate tasks and hard-code the output directory used.
{
"label": "0-set_chrome_output_directory",
"command": "rm -f ${workspaceFolder}/out/current_link; ln -s ${input:chromeOutputDir} ${workspaceFolder}/out/current_link",
"type": "shell",
// The default problem matcher doesn't make sense here, so remove it.
"problemMatcher": [],
"options": {
"cwd": "${workspaceFolder}"
}
},
// Some general-purpose build and test tasks. These all inherit the
// problemMatcher at the top of the file.
{
"label": "1-build_chrome",
"type": "shell",
"command": "autoninja -C ${config:chrome.outputDir} chrome",
"group": "test"
},
{
"label": "2-build_all",
"type": "shell",
"command": "autoninja -C ${config:chrome.outputDir}"
},
{
"label": "3-test_current_file",
"type": "shell",
"command": "${workspaceFolder}/tools/autotest.py -C ${config:chrome.outputDir} --run_all ${file}"
},
{
"label": "4-test_current_directory",
"type": "shell",
"command": "${workspaceFolder}/tools/autotest.py -C ${config:chrome.outputDir} --run_all ${fileDirname}"
},
{
"label": "5-build_current_file",
"type": "shell",
"command": "compile_single_file --build-dir=${config:chrome.outputDir} --file-path=${file}"
},
// Some more specific build tasks, which hard-code the output directory.
{
"label": "6-build_chrome_debug",
"type": "shell",
"command": "autoninja -C ${workspaceFolder}/out/Debug chrome"
},
{
"label": "7-build_chrome_release",
"type": "shell",
"command": "autoninja -C ${workspaceFolder}/out/Release chrome"
},
{
"label": "8-build_test_debug",
"type": "shell",
"command": "autoninja -C ${workspaceFolder}/out/Debug unit_tests components_unittests browser_tests"
}
]
}