From c59d8cfb5c86dc5f8e70c9fb8851efcbe0937ea6 Mon Sep 17 00:00:00 2001 From: Pasha Bibko Date: Mon, 11 Aug 2025 14:09:01 +0100 Subject: [PATCH] Setup VSCode build system Works on both Linux and Windows --- .gitignore | 1 - .vscode/c_cpp_properties.json | 26 ++++++++++++++++ .vscode/launch.json | 57 +++++++++++++++++++++++++++++++++++ .vscode/tasks.json | 14 +++++++++ 4 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore index 304831b..67682e8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ out/ .vs/ # VSC and manual build folders # -.vscode/ build/ # Excludes binary outputs in root dir # diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..c573e2f --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,26 @@ +{ + "version": 4, + + "configurations": [ + { + "name": "Linux", + + "includePath": + [ + "${workspaceFolder}/**" + ], + + "cppStandard": "c++20" + }, + { + "name": "Windows", + + "includePath": + [ + "${workspaceFolder}/**" + ], + + "cppStandard": "c++20" + } + ] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..f6f94ae --- /dev/null +++ b/.vscode/launch.json @@ -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 + } + ] + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..ed93fb2 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,14 @@ +{ + "version": "2.0.0", + + "tasks": + [ + { + "label": "build", + "type": "shell", + "command": "cmake --build build", + "group": "build", + "problemMatcher": [] + } + ] +}