From e16dfc5ad961325fc4073d2d4114ddac1d01574e Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Wed, 20 Aug 2025 20:38:40 +0100 Subject: [PATCH] Added batch script for generating build files Also changed VSC launch names to be less confusing --- .vscode/launch.json | 11 ++++++----- scripts/GenBuildFiles.bat | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 scripts/GenBuildFiles.bat diff --git a/.vscode/launch.json b/.vscode/launch.json index f99a047..5e26054 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -1,9 +1,10 @@ { "version": "0.2.0", + "configurations": [ { - "name": "Debug lxc [Linux]", + "name": "[Linux] LXC", "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/lxc", @@ -27,7 +28,7 @@ }, { - "name": "Debug lxc [Win64]", + "name": "[Win64] LXC", "type": "cppvsdbg", "request": "launch", "program": "${workspaceRoot}/lxc", @@ -35,13 +36,13 @@ "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], - "externalConsole": true, + "console": "externalTerminal", "preLaunchTask": "build" }, { - "name": "Debug LXC_Tests [Linux]", + "name": "[Linux] Tests", "type": "cppdbg", "request": "launch", "program": "${workspaceRoot}/LXC_Tests", @@ -65,7 +66,7 @@ }, { - "name": "Debug LXC_Tests [Win64]", + "name": "[Win64] Tests", "type": "cppvsdbg", "request": "launch", "program": "${workspaceRoot}/LXC_Tests", diff --git a/scripts/GenBuildFiles.bat b/scripts/GenBuildFiles.bat new file mode 100644 index 0000000..62e6fc3 --- /dev/null +++ b/scripts/GenBuildFiles.bat @@ -0,0 +1,18 @@ +@echo off + +:: Makes sure the working directory is repo-root and not scripts/ :: + +for %%I in ("%~dp0.") do set "SCRIPT_DIRNAME=%%~nxI" + +if /i "%SCRIPT_DIRNAME%"=="scripts" ( + cd /d "%~dp0.." +) + +:: Creates and enters the build directory :: + +mkdir build +cd build + +:: Generates the build files (uses Ninja) :: + +cmake .. -G Ninja