Skip to content

Commit

Permalink
Merge pull request #3615 from randombit/pl/add_vscode_msvc_task
Browse files Browse the repository at this point in the history
Extend VS Code settings
  • Loading branch information
lieser authored Jul 17, 2023
2 parents e430d3e + bf5db15 commit 9d2ef81
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/build-data/cc/msvc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ compile_flags "/nologo /c"
optimization_flags "/O2 /Oi"
size_optimization_flags "/O1 /Os"

# for debug info in the object file:
# for debug info in the object file (required if using sccache):
#debug_info_flags "/Z7"

# for using a PDB file:
Expand Down
16 changes: 15 additions & 1 deletion src/editors/vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"configurations": [
{
"name": "Debug Unittests",
"name": "Debug Unittests (gdb)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/botan-test",
Expand All @@ -25,6 +26,19 @@
"ignoreFailures": true
}
]
},
{
"name": "Debug Unittests (msvc)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/botan-test.exe",
"args": [
"--test-threads=1"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"console": "externalTerminal"
}
]
}
}
1 change: 1 addition & 0 deletions src/editors/vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "xaver.clang-format"
},
"C_Cpp.codeAnalysis.clangTidy.enabled": true,
"C_Cpp.default.cppStandard": "c++20",
"C_Cpp.default.cStandard": "c17",
"C_Cpp.formatting": "disabled",
Expand Down
35 changes: 28 additions & 7 deletions src/editors/vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,53 @@
"tasks": [
{
"label": "Configure (gcc)",
"detail": "Default ./configure.py invocation. Run your own if you want.",
"detail": "Default ./configure.py invocation for gcc. Run your own if you want.",
"group": "build",
"type": "shell",
"command": "python3 ./configure.py --cc gcc --compiler-cache=ccache --without-documentation --debug-mode --build-targets=\"static,tests,bogo_shim\"",
"presentation": {
"reveal": "always",
"panel": "shared",
"close": true
"close": false
}
},
{
"label": "Configure (msvc)",
"detail": "Default ./configure.py invocation for msvc. Run your own if you want.",
"group": "build",
"type": "shell",
"shell": {
"args": [
]
},
"command": "python ./configure.py --cc msvc --compiler-cache=sccache.exe --without-documentation --debug-mode --build-targets=\"static,tests\"",
"presentation": {
"reveal": "always",
"panel": "shared",
"close": false
}
},
{
"label": "Build All",
"group": "build",
"type": "shell",
"linux": {
"command": "make -j $(nproc)"
"command": "make -j $(nproc)",
"problemMatcher": "$gcc"
},
"osx": {
"command": "make -j $(sysctl -n hw.logicalcpu)"
"command": "make -j $(sysctl -n hw.logicalcpu)",
"problemMatcher": "$gcc"
},
"windows": {
"command": "jom",
"problemMatcher": "$msCompile"
},
"presentation": {
"reveal": "always",
"panel": "shared",
"close": true
},
"problemMatcher": "$gcc"
"close": false
}
},
{
"label": "Build Unittests",
Expand Down

0 comments on commit 9d2ef81

Please sign in to comment.