]> gitweb.hhaalo.de Git - feierabend.git/commitdiff
add c enviroment hello world
authorBastian Dehn <hhaalo@arcor.de>
Sun, 9 Jun 2024 07:50:11 +0000 (09:50 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 9 Jun 2024 07:50:11 +0000 (09:50 +0200)
.gitignore [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
main.c [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..c795b05
--- /dev/null
@@ -0,0 +1 @@
+build
\ No newline at end of file
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..39cd638
--- /dev/null
@@ -0,0 +1,13 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1)
+
+SET(CMAKE_BUILD_TYPE "Debug" CACHE STRING "build type")
+
+IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
+       SET(CMAKE_C_FLAGS "-Wall -g -fsanitize=address")
+ENDIF()
+
+MESSAGE(STATUS "CMAKE_C_FLAGS: ${CMAKE_C_FLAGS}")
+
+PROJECT(feierabend VERSION 0.0.1)
+
+ADD_EXECUTABLE(${PROJECT_NAME} main.c)
\ No newline at end of file
diff --git a/main.c b/main.c
new file mode 100644 (file)
index 0000000..e3bfac7
--- /dev/null
+++ b/main.c
@@ -0,0 +1,7 @@
+#include <stdio.h>
+
+int main()
+{
+       printf("Hello World!\n");
+       return 0;
+}
\ No newline at end of file