From cd152d910cf5613a7acdab84e1c4165d52905233 Mon Sep 17 00:00:00 2001 From: jiriks74 Date: Tue, 3 Dec 2024 14:29:33 +0100 Subject: [PATCH] feat(C_Template): Add `.vscode` template, add test.input (empty) file --- C_Template/.vscode/launch.json | 38 ++++++++++++++++++++++++++++++++++ C_Template/.vscode/tasks.json | 26 +++++++++++++++++++++++ C_Template/test.input | 0 3 files changed, 64 insertions(+) create mode 100644 C_Template/.vscode/launch.json create mode 100644 C_Template/.vscode/tasks.json create mode 100644 C_Template/test.input diff --git a/C_Template/.vscode/launch.json b/C_Template/.vscode/launch.json new file mode 100644 index 0000000..5d65f74 --- /dev/null +++ b/C_Template/.vscode/launch.json @@ -0,0 +1,38 @@ +{ + "configurations": [ + { + "name": "Launch with puzzle input", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/C_Template", + "args": ["../puzzle.input"], + "stopAtEntry": true, + "cwd": "${workspaceFolder}/build/", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "build", + }, + { + "name": "Launch with test input", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/build/C_Template", + "args": ["../test.input"], + "stopAtEntry": true, + "cwd": "${workspaceFolder}/build/", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "build", + } + ] +} diff --git a/C_Template/.vscode/tasks.json b/C_Template/.vscode/tasks.json new file mode 100644 index 0000000..4e13acb --- /dev/null +++ b/C_Template/.vscode/tasks.json @@ -0,0 +1,26 @@ +{ +"version": "2.0.0", +"tasks": [ + { + "label": "cmake", + "type": "shell", + "options": { + "cwd": "${workspaceFolder}" + }, + "command": "sh", + "args": [ + "-c", + "'mkdir -p build && cd build && cmake -DCMAKE_BUILD_TYPE=Debug ..'" + ], + }, + { + "label": "build", + "type": "shell", + "command": "make", + "options": { + "cwd": "${workspaceRoot}/build" + }, + "dependsOn":["cmake"] + } + ] +} diff --git a/C_Template/test.input b/C_Template/test.input new file mode 100644 index 0000000..e69de29