From 421300c27123ca647772dc6d9bd0cabf7f5f9c99 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Wed, 23 Jul 2025 19:39:13 +0200 Subject: refactor: src & pragma once --- CMakeLists.txt | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index c022fc3..a5fd18e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,26 +2,13 @@ cmake_minimum_required(VERSION 3.30.5) project(kagamic VERSION 0.1 LANGUAGES C) set(CMAKE_C_STANDARD 17) -add_executable(main - main.c - string.h string.c - memory.h memory.c - vec.h vec.c - json.h json.c - log.h log.c -) +file(GLOB SOURCES "src/*.c") +file(GLOB TEST_SOURCES "test/*.c") + +add_executable(main main.c ${SOURCES}) target_link_libraries(main m) target_compile_options(main PRIVATE -Wall -pedantic -Wextra) - -add_executable(test - test.c - testing.h - string.h string.c - memory.h memory.c - vec.h vec.c - json.h json.c - log.h log.c -) +add_executable(test test.c ${SOURCES} ${TEST_SOURCES}) target_link_libraries(test m) target_compile_options(test PRIVATE -Wall -pedantic -Wextra) -- cgit v1.3