From 5db711bd624eb9bbf8b27ae184ddda7c9d401aee Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 26 Jun 2024 17:57:23 +0900 Subject: [PATCH] Create skeleton C project --- .gitignore | 2 ++ CMakeLists.txt | 22 ++++++++++++++++++++++ src/main.c | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 src/main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..36cfdb9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/build*/ +compile_commands.json diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9ea54f8 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,22 @@ +cmake_minimum_required(VERSION 3.7) +project(SimpleArchiver C) + +set(SimpleArchiver_VERSION 1.0) + +set(SimpleArchiver_SOURCES + src/main.c +) + +add_compile_options( + -Wall -Wextra -Wpedantic -Wno-missing-braces + $<$:-Weffc++> + $<$:-O0> +) + +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "Setting build type to 'Debug', none was specified.") + set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") +endif() + +add_executable(SimpleArchiver ${SimpleArchiver_SOURCES}) diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..11b7fad --- /dev/null +++ b/src/main.c @@ -0,0 +1,3 @@ +int main(int argc, char **argv) { + return 0; +}