Setup VSCode build system

Works on both Linux and Windows
This commit is contained in:
2025-08-11 14:09:01 +01:00
parent 123d5219aa
commit c59d8cfb5c
4 changed files with 97 additions and 1 deletions

1
.gitignore vendored
View File

@@ -5,7 +5,6 @@ out/
.vs/
# VSC and manual build folders #
.vscode/
build/
# Excludes binary outputs in root dir #

26
.vscode/c_cpp_properties.json vendored Normal file
View File

@@ -0,0 +1,26 @@
{
"version": 4,
"configurations": [
{
"name": "Linux",
"includePath":
[
"${workspaceFolder}/**"
],
"cppStandard": "c++20"
},
{
"name": "Windows",
"includePath":
[
"${workspaceFolder}/**"
],
"cppStandard": "c++20"
}
]
}

57
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,57 @@
{
"version": "0.2.0",
"configurations":
[
{
"name": "Run lxc",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/lxc",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"preLaunchTask": "build",
"windows": { "MIMode": "cppvsdbg", },
"linux": { "MIMode": "gdb" },
"setupCommands":
[
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
]
},
{
"name": "Run LXC_Tests",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/LXC_Tests",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"preLaunchTask": "build",
"windows": { "MIMode": "cppvsdbg", },
"linux": { "MIMode": "gdb" },
"setupCommands":
[
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
]
}
]
}

14
.vscode/tasks.json vendored Normal file
View File

@@ -0,0 +1,14 @@
{
"version": "2.0.0",
"tasks":
[
{
"label": "build",
"type": "shell",
"command": "cmake --build build",
"group": "build",
"problemMatcher": []
}
]
}