diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ac8538a --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,30 @@ +# Project Setup +cmake_minimum_required(VERSION 3.21) +project( + projet + VERSION 1.0.0 + DESCRIPTION "CI/CD Test" + HOMEPAGE_URL "https://www.etheryo.fr/" + LANGUAGES C +) +set(TARGET out) + +# Source files +set(SOURCES "${PROJECT_SOURCE_DIR}/src") +add_executable(${TARGET} + ${SOURCES}/main.c +) + +# Setting target properties for output directories +set_target_properties(${TARGET} + PROPERTIES + ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" +) + +# Including the include folder +target_include_directories(${TARGET} PUBLIC "${PROJECT_SOURCE_DIR}/include") + +# Compilation +target_compile_options(${TARGET} PUBLIC -Wall -Wextra -Wpedantic -Werror) diff --git a/build/out b/build/out new file mode 100755 index 0000000..c440e0d Binary files /dev/null and b/build/out differ diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..2581101 --- /dev/null +++ b/src/main.c @@ -0,0 +1,7 @@ +#include + +int main(void) +{ + printf("Hello world\n"); + return 0; +}