Skip to content

Instantly share code, notes, and snippets.

@sneppy
Last active September 24, 2021 09:45
Show Gist options
  • Save sneppy/48f7658e7f625bff693cee240230273f to your computer and use it in GitHub Desktop.
Save sneppy/48f7658e7f625bff693cee240230273f to your computer and use it in GitHub Desktop.
VS Code settings for building, testing and debugging C/C++ projects
*.a
*.so
*.so.?*
*.dll
*.exe
*.dylib
*.cmake
!/cmake/*.cmake
!/test/AssemblyTests.cmake
*~
*.swp
*.pyc
__pycache__
# lcov
*.lcov
/lcov
# cmake files.
/Testing
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
# makefiles.
Makefile
# in-source build.
bin/
lib/
/test/*_test
# exuberant ctags.
tags
# YouCompleteMe configuration.
.ycm_extra_conf.pyc
# ninja generated files.
.ninja_deps
.ninja_log
build.ninja
install_manifest.txt
rules.ninja
# bazel output symlinks.
bazel-*
# out-of-source build top-level folders.
build/
_build/
build*/
# Visual Studio 2015/2017 cache/options directory
.vs/
CMakeSettings.json
# Visual Studio Code cache/options directory
.vscode/
# Python build stuff
dist/
*.egg-info*
# External sources
external/
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug active target (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${command:cmake.launchTargetPath}",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
{
"tasks": [
{
"label": "Build active target",
"type": "cmake",
"command": "build",
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": true
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "Launch active target",
"type": "process",
"command": "${command:cmake.launchTargetPath}",
"dependsOn": ["Build active target"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"group": {
"kind": "test",
"isDefault": true
},
"problemMatcher": [
"$gcc"
]
},
{
"label": "Memory-debug active target",
"type": "process",
"command": "valgrind",
"args": [
"-s",
"--leak-check=full",
"${command:cmake.launchTargetPath}"
],
"dependsOn": ["Build active target"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": true,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"group": "test"
}
],
"version": "2.0.0"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment