From 6ba8c1e9f9e040e12512ca2d11b646f1ca3b7893 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sun, 3 Nov 2024 11:02:34 +0100 Subject: [PATCH] cmake: don't include syslog files if CONFIG_SYSLOG=n don't include syslog files if CONFIG_SYSLOG=n --- drivers/syslog/CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/syslog/CMakeLists.txt b/drivers/syslog/CMakeLists.txt index 1090ac65bb..ddc7663658 100644 --- a/drivers/syslog/CMakeLists.txt +++ b/drivers/syslog/CMakeLists.txt @@ -17,11 +17,21 @@ # the License. # # ############################################################################## -# ############################################################################## # Include SYSLOG Infrastructure -set(SRCS vsyslog.c syslog_channel.c syslog_putc.c syslog_write.c syslog_flush.c) +set(SRCS) + +if(CONFIG_SYSLOG) + list( + APPEND + SRCS + vsyslog.c + syslog_channel.c + syslog_putc.c + syslog_write.c + syslog_flush.c) +endif() if(CONFIG_SYSLOG_INTBUFFER) list(APPEND SRCS syslog_intbuffer.c)