From 5f8f5140eb6d7aa204d2565eec29fd7a2a934906 Mon Sep 17 00:00:00 2001 From: Oxore Date: Fri, 29 Dec 2023 00:20:57 +0300 Subject: Introduce runtime log level switching --- CMakeLists.txt | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 40a1814..4a33eef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,37 +35,30 @@ set(compile_flags ) set(compile_definitions $<$:_FORTIFY_SOURCE=2> - LOG_ERROR=1 - LOG_WARNING=1 - LOG_INFO=1 - $<$:LOG_DEBUG=1> - $<$:LOG_TRACE=0> - $<$>:LOG_DEBUG=0> - $<$>:LOG_TRACE=0> ) -add_library(timespec OBJECT lib/timespec/timespec.c lib/timespec/timespec.h) -target_compile_options(timespec PRIVATE ${compile_flags}) -target_compile_definitions(timespec PRIVATE ${compile_definitions}) -target_link_options(timespec PRIVATE $<$:${common_debug_flags}>) - add_library(common OBJECT + debug.c + debug.h proto.c proto.h proto_io.c proto_io.h + lib/timespec/timespec.c + lib/timespec/timespec.h + lib/optparse/optparse.h ) target_compile_options(common PRIVATE ${compile_flags}) target_compile_definitions(common PRIVATE ${compile_definitions}) target_link_options(common PRIVATE $<$:${common_debug_flags}>) -add_executable(server server.c $ $) +add_executable(server server.c $) target_compile_options(server PRIVATE ${compile_flags}) target_compile_definitions(server PRIVATE ${compile_definitions}) target_link_options(server PRIVATE $<$:${common_debug_flags}>) target_include_directories(server PRIVATE . lib) -add_executable(client client.c $ $) +add_executable(client client.c $) target_compile_options(client PRIVATE ${compile_flags}) target_compile_definitions(client PRIVATE ${compile_definitions}) target_link_options(client PRIVATE $<$:${common_debug_flags}>) -- cgit v1.2.3