Skip to content

Commit 1e6095f

Browse files
committed
build: specify build system in meson build tasks, hide intermediate tasks from task list
Rename all top-level meson build tasks, prefixing with `meson`, and update their references in launch config. Hide configuration/invoked tasks from the editor task list as they shouldn't be called independently.
1 parent 720107b commit 1e6095f

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

.vscode/launch.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"request": "launch",
1414
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand",
1515
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
16-
"preLaunchTask": "Build Release",
16+
"preLaunchTask": "meson Build Release",
1717
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
1818
"presentation": {
1919
"group": "meson",
@@ -35,7 +35,7 @@
3535
"request": "launch",
3636
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand_debug",
3737
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
38-
"preLaunchTask": "Build Debug (Release)",
38+
"preLaunchTask": "meson Build Debug (Release)",
3939
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
4040
"presentation": {
4141
"group": "meson",
@@ -45,7 +45,7 @@
4545
"presentation": {
4646
"hidden": true
4747
},
48-
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/Cortex Command.debug.release.exe",
48+
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/Cortex Command.debug.release.exe"
4949
}
5050
},
5151
{
@@ -57,7 +57,7 @@
5757
"request": "launch",
5858
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand_debug",
5959
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
60-
"preLaunchTask": "Build Debug (Minimal)",
60+
"preLaunchTask": "meson Build Debug (Minimal)",
6161
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
6262
"presentation": {
6363
"group": "meson",
@@ -79,7 +79,7 @@
7979
"request": "launch",
8080
"program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/CortexCommand_debug",
8181
"cwd": "${workspaceFolder}/../Cortex-Command-Community-Project-Data",
82-
"preLaunchTask": "Build Debug (Full)",
82+
"preLaunchTask": "meson Build Debug (Full)",
8383
"envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env",
8484
"presentation": {
8585
"group": "meson",

.vscode/tasks.json

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"label": "Build Release",
5+
"label": "meson Build Release",
66
"dependsOn": ["Configure Release", "Meson: Build all targets"],
77
"dependsOrder": "sequence"
88
},
99
{
10-
"label": "Build Debug (Release)",
10+
"label": "meson Build Debug (Release)",
1111
"dependsOn": ["Configure Debug (Release)", "Meson: Build all targets"],
1212
"dependsOrder": "sequence"
1313
},
1414
{
15-
"label": "Build Debug (Minimal)",
15+
"label": "meson Build Debug (Minimal)",
1616
"dependsOn": ["Configure Debug (Minimal)", "Meson: Build all targets"],
1717
"dependsOrder": "sequence"
1818
},
1919
{
20-
"label": "Build Debug (Full)",
20+
"label": "meson Build Debug (Full)",
2121
"dependsOn": ["Configure Debug (Full)", "Meson: Build all targets"],
2222
"dependsOrder": "sequence"
2323
},
@@ -27,8 +27,8 @@
2727
"problemMatcher": ["$meson-gcc"],
2828
"command": "meson",
2929
"args": ["setup", "${config:mesonbuild.buildFolder}"],
30-
"windows" : {
31-
"args": ["setup", "${config:mesonbuild.buildFolder}", "--vsenv"],
30+
"windows": {
31+
"args": ["setup", "${config:mesonbuild.buildFolder}", "--vsenv"]
3232
},
3333
"osx": {
3434
"options": {
@@ -45,6 +45,7 @@
4545
"type": "process",
4646
"problemMatcher": ["$meson-gcc"],
4747
"command": "meson",
48+
"hide": true,
4849
"args": [
4950
"configure",
5051
"--buildtype=debug",
@@ -66,6 +67,7 @@
6667
"type": "process",
6768
"problemMatcher": ["$meson-gcc"],
6869
"command": "meson",
70+
"hide": true,
6971
"args": [
7072
"configure",
7173
"--buildtype=debug",
@@ -81,13 +83,13 @@
8183
"${config:mesonbuild.buildFolder}"
8284
]
8385
}
84-
8586
},
8687
{
8788
"label": "Configure Debug (Full)",
8889
"type": "process",
8990
"problemMatcher": ["$meson-gcc"],
9091
"command": "meson",
92+
"hide": true,
9193
"args": [
9294
"configure",
9395
"--buildtype=debug",
@@ -109,6 +111,7 @@
109111
"type": "process",
110112
"problemMatcher": ["$meson-gcc"],
111113
"command": "meson",
114+
"hide": true,
112115
"args": [
113116
"configure",
114117
"--buildtype=release",
@@ -126,6 +129,7 @@
126129
},
127130
{
128131
"type": "meson",
132+
"hide": true,
129133
"mode": "build",
130134
"problemMatcher": ["$meson-gcc"],
131135
"group": "build"

0 commit comments

Comments
 (0)