From f1af95367dc562ac26e8f8f4395dd615c654d4e4 Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Wed, 29 Jun 2022 11:23:35 +0200 Subject: [PATCH] Chore: Add cmake configuration for vscode --- .gitignore | 1 + .vscode/extensions.json | 3 ++- .vscode/settings.json | 15 ++++++++------- .vscode/tasks.json | 28 ++++++++++++++++++++++++++++ Implementierung/CMakeLists.txt | 2 +- 5 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 .gitignore create mode 100644 .vscode/tasks.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c795b05 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 5a9a397..420dda6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,6 @@ { "recommendations": [ - "ms-vscode.cpptools" + "ms-vscode.cpptools", + "twxs.cmake" ] } \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index bd546be..fc00b84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,8 +1,9 @@ { - "C_Cpp.clang_format_fallbackStyle": "Google", - "files.associations": { - "functional": "c", - "helper.h": "c" - }, - "editor.formatOnSave": true -} \ No newline at end of file + "C_Cpp.clang_format_fallbackStyle": "Google", + "files.associations": { + "functional": "c", + "helper.h": "c" + }, + "editor.formatOnSave": true, + "cmake.sourceDirectory": "${workspaceFolder}/Implementierung" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..08d9005 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,28 @@ +{ + "tasks": [ + { + "type": "cppbuild", + "label": "C/C++: gcc build active file", + "command": "/usr/bin/gcc", + "args": [ + "-fdiagnostics-color=always", + "-g", + "${file}", + "-o", + "${fileDirname}/${fileBasenameNoExtension}" + ], + "options": { + "cwd": "${fileDirname}" + }, + "problemMatcher": [ + "$gcc" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "detail": "Task generated by Debugger." + } + ], + "version": "2.0.0" +} \ No newline at end of file diff --git a/Implementierung/CMakeLists.txt b/Implementierung/CMakeLists.txt index e164800..e312b0e 100644 --- a/Implementierung/CMakeLists.txt +++ b/Implementierung/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.6.0) +cmake_minimum_required(VERSION 3.0.0) # here we specify that the project is C language only, so the default # C compiler on the system will be used