From abc5c4209d66b3162eca363d80f21efb9b0ffdec Mon Sep 17 00:00:00 2001 From: MrGeorgen Date: Wed, 3 Jun 2020 01:19:56 +0200 Subject: [PATCH] CMake file --- CMakeLists.txt | 6 ++++++ README.md | 4 ++-- build_and_run.sh | 3 +++ src/main.c | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 CMakeLists.txt create mode 100755 build_and_run.sh create mode 100644 src/main.c diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..982eb95 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +project(advanced_C_standard_library) +cmake_minimum_required(VERSION 3.0) +include_directories(src) +file(GLOB SOURCES "src/*.c") +add_executable(test.out ${SOURCES}) +install(TARGETS DESTINATION ${CMAKE_SOURCE_DIR}) diff --git a/README.md b/README.md index 6303c42..e725a68 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -# advaned_C_standard_library +# advanced C standard library -A collection of C functions, I commonly use. \ No newline at end of file +A collection of C functions, I commonly use. diff --git a/build_and_run.sh b/build_and_run.sh new file mode 100755 index 0000000..b685e00 --- /dev/null +++ b/build_and_run.sh @@ -0,0 +1,3 @@ +#!/bin/sh +make +./build/test.out diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..8b385c4 --- /dev/null +++ b/src/main.c @@ -0,0 +1,4 @@ +#include +int main() { + printf("%s", "baum\n"); +}