From 55e42817befc6537834fd224b420469ae276a411 Mon Sep 17 00:00:00 2001 From: Tilo-K Date: Fri, 20 Jun 2025 13:23:33 +0200 Subject: [PATCH] inital --- .gitignore | 1 + CMakeLists.txt | 23 +++++++++++++++++++++++ src/seaflags.c | 0 tests/CMakeLists.txt | 12 ++++++++++++ tests/test_main.c | 4 ++++ 5 files changed, 40 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt create mode 100644 src/seaflags.c create mode 100644 tests/CMakeLists.txt create mode 100644 tests/test_main.c diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..87d934b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.16) +project(SeaFlags LANGUAGES CXX C) + +enable_testing() +add_subdirectory(tests) + +add_library(SeaFlags STATIC + src/seaflags.c +) + +target_include_directories(SeaFlags + PUBLIC + "$" + "$" +) + +install(TARGETS SeaFlags + ARCHIVE DESTINATION lib +) + +install(DIRECTORY include/ + DESTINATION include +) diff --git a/src/seaflags.c b/src/seaflags.c new file mode 100644 index 0000000..e69de29 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 0000000..691835a --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,12 @@ +add_executable(SeaFlagTests + test_main.c +) + +target_link_libraries(SeaFlagTests PRIVATE SeaFlags) + +target_include_directories(SeaFlagTests + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/../include +) + +add_test(NAME RunSeaFlagTests COMMAND SeaFlagTests) diff --git a/tests/test_main.c b/tests/test_main.c new file mode 100644 index 0000000..9942f73 --- /dev/null +++ b/tests/test_main.c @@ -0,0 +1,4 @@ +int main(void) { + return 0; + +}