188 lines
6.4 KiB
JSON
188 lines
6.4 KiB
JSON
{
|
|
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
// for the documentation about the tasks.json format
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "cmake configure",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake -E copy_if_different ${workspaceFolder}/build/compile_commands.json ${workspaceFolder}/compile_commands.json",
|
|
"problemMatcher": [],
|
|
},
|
|
{
|
|
"label": "cmake build",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && cmake --build build",
|
|
"problemMatcher": [],
|
|
},
|
|
{
|
|
"label": "Run new build",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && pwd && cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake -E copy_if_different ${workspaceFolder}/build/compile_commands.json ${workspaceFolder}/compile_commands.json && cmake --build build --target run",
|
|
"problemMatcher": [],
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true,
|
|
},
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": false,
|
|
"panel": "dedicated",
|
|
"showReuseMessage": true,
|
|
"clear": true,
|
|
},
|
|
},
|
|
{
|
|
"label": "Copy new build to SD",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && pwd && cmake -S . -B build -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake -E copy_if_different ${workspaceFolder}/build/compile_commands.json ${workspaceFolder}/compile_commands.json && cmake --build build --target install_sd",
|
|
"problemMatcher": [],
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "silent",
|
|
"focus": false,
|
|
"panel": "dedicated",
|
|
"showReuseMessage": true,
|
|
"clear": false,
|
|
},
|
|
},
|
|
{
|
|
"label": "cmake debug",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && cmake -S . -B build-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake -E copy_if_different ${workspaceFolder}/build-debug/compile_commands.json ${workspaceFolder}/compile_commands.json && cmake --build build-debug",
|
|
"problemMatcher": [],
|
|
},
|
|
{
|
|
"label": "cmake release",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake -E copy_if_different ${workspaceFolder}/build/compile_commands.json ${workspaceFolder}/compile_commands.json && cmake --build build",
|
|
"problemMatcher": [],
|
|
"group": {
|
|
"kind": "build",
|
|
"isDefault": true,
|
|
},
|
|
},
|
|
{
|
|
"label": "cmake clean",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && if [ -d build ]; then cmake --build build --target clean; fi && if [ -d build-debug ]; then cmake --build build-debug --target clean; fi",
|
|
"problemMatcher": [],
|
|
},
|
|
{
|
|
"label": "clang-tidy (all)",
|
|
"type": "shell",
|
|
"command": "cd ${workspaceFolder} && mkdir -p .clang-tidy-db && sed 's/-mthumb-interwork//g' compile_commands.json > .clang-tidy-db/compile_commands.json && run-clang-tidy -p .clang-tidy-db '.*\\.(c|cc|cpp|cxx)$' -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/15.2.0 -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/15.2.0/arm-none-eabi -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include/c++/15.2.0/backward -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/15.2.0/include -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/lib/gcc/arm-none-eabi/15.2.0/include-fixed -extra-arg=-isystem -extra-arg=/opt/devkitpro/devkitARM/arm-none-eabi/include",
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "cpp",
|
|
"fileLocation": "absolute",
|
|
"pattern": [
|
|
{
|
|
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note):\\s+(.*?)(?:\\s+\\[.*\\])?$",
|
|
"file": 1,
|
|
"line": 2,
|
|
"column": 3,
|
|
"severity": 4,
|
|
"message": 5
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"group": "test",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": false,
|
|
"panel": "dedicated",
|
|
"clear": true
|
|
}
|
|
},
|
|
{
|
|
"label": "clang-tidy (watch changed)",
|
|
"type": "shell",
|
|
"isBackground": true,
|
|
"command": "cd ${workspaceFolder} && bash tools/clang_tidy_watch.sh",
|
|
"problemMatcher": [
|
|
{
|
|
"owner": "cpp",
|
|
"fileLocation": "absolute",
|
|
"pattern": [
|
|
{
|
|
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error|note):\\s+(.*?)(?:\\s+\\[.*\\])?$",
|
|
"file": 1,
|
|
"line": 2,
|
|
"column": 3,
|
|
"severity": 4,
|
|
"message": 5
|
|
}
|
|
],
|
|
"background": {
|
|
"activeOnStart": true,
|
|
"beginsPattern": "^TIDY-WATCH-BEGIN$",
|
|
"endsPattern": "^TIDY-WATCH-END$"
|
|
}
|
|
}
|
|
],
|
|
"group": "test",
|
|
"presentation": {
|
|
"echo": true,
|
|
"reveal": "always",
|
|
"focus": false,
|
|
"panel": "dedicated",
|
|
"clear": true
|
|
}
|
|
},
|
|
{
|
|
"label": "run",
|
|
"type": "shell",
|
|
"isBackground": true,
|
|
"command": "melonDS",
|
|
"args": ["${workspaceFolder}/${workspaceFolderBasename}.nds"],
|
|
"presentation": {
|
|
"clear": true,
|
|
"reveal": "always",
|
|
},
|
|
"problemMatcher": [],
|
|
},
|
|
{
|
|
"label": "gdb-debug",
|
|
"type": "shell",
|
|
"dependsOn": ["cmake debug"],
|
|
"isBackground": true,
|
|
"command": "melonDS",
|
|
"args": [
|
|
"${workspaceFolder}/${workspaceFolderBasename}.nds"
|
|
],
|
|
"presentation": {
|
|
"clear": true,
|
|
"reveal": "always",
|
|
},
|
|
"problemMatcher": [
|
|
{
|
|
"pattern": [
|
|
{
|
|
"regexp": ".",
|
|
"file": 1,
|
|
"location": 2,
|
|
"message": 3,
|
|
},
|
|
],
|
|
"background": {
|
|
"activeOnStart": true,
|
|
"beginsPattern": ".",
|
|
"endsPattern": ".",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
{
|
|
"label": "stop-emulation",
|
|
"type": "shell",
|
|
"command": "pkill",
|
|
"args": ["--signal", "9", "melonDS"],
|
|
"problemMatcher": [],
|
|
},
|
|
],
|
|
}
|