Skip to content

Commit

Permalink
add out-of-tree build to vscode
Browse files Browse the repository at this point in the history
  • Loading branch information
raoulh committed Jan 16, 2024
1 parent 0bf4f56 commit aab8c7b
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"configurations": [

{
"name": "(gdb) Lancer",
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/src/bin/calaos_server/calaos_server",
"program": "${workspaceRoot}/_build/src/bin/calaos_server/calaos_server",

"args": [],
"stopAtEntry": false,
"cwd": "${workspaceRoot}/src/bin/calaos_server",
"cwd": "${workspaceRoot}/_build/src/bin/calaos_server",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
Expand Down
29 changes: 26 additions & 3 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,47 @@
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "create_build_folder",
"type": "shell",
"command": "mkdir -p _build",
"group": "build",
},
{
"label": "build",
"type": "shell",
"command": "make -j16",
"problemMatcher": "$gcc",
"options": {
"cwd": "${workspaceFolder}/_build"
},
"group": {
"kind": "build",
"isDefault": true
}
},
"dependsOn": [
"create_build_folder",
],
},
{
"label": "clean",
"type": "shell",
"command": "make clean",
"options": {
"cwd": "${workspaceFolder}/_build"
},
"group": "build",
"dependsOn": [
"create_build_folder",
],

},
{
"label": "configure (Debug)",
"type": "shell",
"command": "./configure",
"command": "../configure",
"options": {
"cwd": "${workspaceFolder}/_build",
"env": {
"CFLAGS": "-g3 -ggdb -O0",
"CXXFLAGS": "-g3 -ggdb -O0"
Expand All @@ -37,7 +57,10 @@
{
"label": "configure (Release)",
"type": "shell",
"command": "./configure",
"command": "../configure",
"options": {
"cwd": "${workspaceFolder}/_build",
},
"dependsOn": [
"clean"
],
Expand Down

0 comments on commit aab8c7b

Please sign in to comment.