From eb203bcf00d821598e9639222b153b312a035406 Mon Sep 17 00:00:00 2001 From: portnoytmy Date: Mon, 2 Jun 2025 22:43:21 +0200 Subject: [PATCH] =?UTF-8?q?Initiales=20Commit=20f=C3=BCr=20BS=5FPraktikum4?= =?UTF-8?q?=20Projekt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 30 ++++++++++++++++++++++++++++++ BS_Praktikum4.cpp | 11 +++++++++++ BS_Praktikum4.h | 14 ++++++++++++++ CMakeLists.txt | 25 +++++++++++++++++++++++++ README.md | 0 main.cpp | 16 ++++++++++++++++ 6 files changed, 96 insertions(+) create mode 100644 .gitignore create mode 100644 BS_Praktikum4.cpp create mode 100644 BS_Praktikum4.h create mode 100644 CMakeLists.txt create mode 100644 README.md create mode 100644 main.cpp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..80ccb77 --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# Build-Verzeichnisse +build/ +bin/ +lib/ + +# CMake-Dateien +CMakeFiles/ +CMakeCache.txt +cmake_install.cmake +Makefile + +# Compiled Object files +*.o +*.obj + +# Shared objects +*.so +*.dylib +*.dll + +# Executables +*.exe +*.out +*.app + +# IDE-spezifische Dateien +.vscode/ +.idea/ +*.swp +*~ diff --git a/BS_Praktikum4.cpp b/BS_Praktikum4.cpp new file mode 100644 index 0000000..0af24eb --- /dev/null +++ b/BS_Praktikum4.cpp @@ -0,0 +1,11 @@ +/** + * @file BS_Praktikum4.cpp + * @brief Implementierung der Funktionen für das BS_Praktikum4 Projekt + */ + +#include "BS_Praktikum4.h" +#include + +void sayHello() { + std::cout << "Hallo aus der BS_Praktikum4 Implementierung!" << std::endl; +} diff --git a/BS_Praktikum4.h b/BS_Praktikum4.h new file mode 100644 index 0000000..5fdb736 --- /dev/null +++ b/BS_Praktikum4.h @@ -0,0 +1,14 @@ +/** + * @file BS_Praktikum4.h + * @brief Hauptheader für das BS_Praktikum4 Projekt + */ + +#ifndef BS_Praktikum4_H +#define BS_Praktikum4_H + +/** + * @brief Gibt eine Begrüßungsnachricht aus + */ +void sayHello(); + +#endif // BS_Praktikum4_H diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c825721 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.10) +project(BS_Praktikum4 VERSION 0.1.0 LANGUAGES CXX) + +# Compiler-Optionen +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +# Warnungen und Debug-Informationen bei Entwicklung aktivieren +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -g") +endif() + +# Aktuelles Verzeichnis als Include-Pfad hinzufügen +include_directories(.) + +# Quellen sammeln +file(GLOB SOURCES *.cpp) +file(GLOB HEADERS *.h *.hpp) + +# Ausführbare Datei erstellen +add_executable(${PROJECT_NAME} ${SOURCES}) + +# Installation konfigurieren +install(TARGETS ${PROJECT_NAME} DESTINATION bin) diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..6b4677f --- /dev/null +++ b/main.cpp @@ -0,0 +1,16 @@ +/** + * @file main.cpp + * @brief Hauptdatei für das BS_Praktikum4 Projekt + */ + +#include +#include "BS_Praktikum4.h" + +int main() { + std::cout << "Willkommen zum BS_Praktikum4 Projekt!" << std::endl; + + // Beispielaufruf einer Funktion aus der Header-Datei + sayHello(); + + return 0; +}