Skip to content

Commit

Permalink
chore: converted launch tasks to use cmake tools
Browse files Browse the repository at this point in the history
  • Loading branch information
charliekush committed Jul 22, 2024
1 parent e0511c9 commit f110a12
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 15 deletions.
28 changes: 25 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"version": "0.2.0",
"configurations": [

{
"name": "Python Debugger: Current File",
"type": "debugpy",
Expand Down Expand Up @@ -101,9 +102,30 @@
"name": "Google Tests Debugger",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/tests/build/googletests",
"cwd": "${workspaceRoot}/tests",
"preLaunchTask": "Compile Google Tests"
"program": "${command:cmake.launchTargetPath}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/tests",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "CMake: build",
"miDebuggerPath": "/usr/bin/gdb",
"logging": {
"moduleLoad": false,
"programOutput": true,
"engineLogging": false,
"trace": false,
"traceResponse": false
}
}

]
}
10 changes: 9 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,13 @@
"C_Cpp.vcFormat.indent.preserveWithinParentheses": true,
"C_Cpp.vcFormat.indent.preprocessor": "oneLeft",
"C_Cpp.errorSquiggles": "enabled",

"cmake.generator": "Ninja",
"cmake.sourceDirectory": "${workspaceFolder}",
"cmake.buildDirectory": "${workspaceFolder}/build",

"cmake.configureArgs": [
"-DTEST=ON",
"-DCMAKE_BUILD_TYPE=Debug"
]

}
20 changes: 9 additions & 11 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "Compile Google Tests",
"command": "cmake ../ -Bbuild -DCMAKE_BUILD_TYPE=Debug && make -Cbuild",
"options": {
"cwd": "${workspaceRoot}/tests"
},
"group": {
"kind": "build",
"isDefault": true
}
},
"type": "shell",
"label": "clean",
"command": "cmake --build ${workspaceFolder}/build --target clean",
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": []
}



Expand Down

0 comments on commit f110a12

Please sign in to comment.