From 3c72d09e52d4651ae58bbf952a006bbdd8398275 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Tue, 16 Jul 2024 11:00:38 +0200 Subject: [PATCH] add hello world enviroment for c --- .gitignore | 1 + CMakeLists.txt | 6 ++++++ src/CMakeLists.txt | 3 +++ src/main.c | 7 +++++++ tests/CMakeLists.txt | 1 + 5 files changed, 18 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 src/CMakeLists.txt create mode 100644 src/main.c create mode 100644 tests/CMakeLists.txt 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/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a8767e9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) + +PROJECT(mv_none_space) + +add_subdirectory(src) +add_subdirectory(tests) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..748fdc6 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,3 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) + +ADD_EXECUTABLE(${PROJECT_NAME} main.c) \ No newline at end of file diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..e3bfac7 --- /dev/null +++ b/src/main.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("Hello World!\n"); + return 0; +} \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..bee9133 --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.25.1) \ No newline at end of file -- 2.39.5