From ed35883e2e1f8452581ff36772a5bc16498e6976 Mon Sep 17 00:00:00 2001 From: theskywinds Date: Mon, 26 May 2025 11:40:01 +0200 Subject: [PATCH] Proper initial commit --- CMakeLists.txt | 25 +++++++++++++++++++++++++ src/main.cpp | 5 +++++ 2 files changed, 30 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 src/main.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d5d4d9f --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.31) +project(atm_admin_program) + +set(CMAKE_CXX_STANDARD 20) + +add_executable(atm_admin_program + src/main.cpp) + +target_compile_options(${PROJECT_NAME} PRIVATE + # Make all warnings into errors + -Werror + + # Basic warning flags + -Wall # Enable all common warnings + -Wextra # Enable extra warnings not covered by -Wall + -Wpedantic # Issue warnings demanded by strict ISO C and ISO C++ + -pedantic-errors # Like -Wpedantic but errors instead of warnings + + # Specific warning categories + -Wshadow # Warn when a variable declaration shadows another + -Wcast-align # Warn for potential performance problems from memory alignment + -Wconversion # Warn on type conversions that may lose data + -Wsign-conversion # Warn on sign conversions + -Wnull-dereference # Warn about null pointer dereference +) diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..f67f8c5 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,5 @@ +#include + +int main() { + std::cout << "Hello, world!"; +} \ No newline at end of file