From 1604d379966f0091a0120c6d2b8a0499f1f6496e Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Tue, 9 Jun 2026 15:37:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E4=B8=BB=E7=BA=BF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/CMakeLists.txt | 3 ++- main/CMakeLists.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt index 9a99b27..6beda36 100644 --- a/library/CMakeLists.txt +++ b/library/CMakeLists.txt @@ -21,7 +21,7 @@ endif() # ─── 收集源文件 ────────────────────────────────────────────────────── if(NOT NEED_FLATTEN) - file(GLOB MODULE_SRCS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c") + file(GLOB_RECURSE MODULE_SRCS CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/*.c") # 过滤编辑器临时文件 list(FILTER MODULE_SRCS EXCLUDE REGEX ".*[~]$|.*\\.bak$|.*\\.swp$") endif() @@ -203,6 +203,7 @@ endif() target_compile_options(${TARGET_NAME} PRIVATE -Wall -Werror -ffunction-sections -fdata-sections + -Wno-unused-function $<$:-g -O0> $<$:-O2> ) diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 137de78..8d8f322 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -55,6 +55,7 @@ endif() target_compile_options(${TARGET_NAME} PRIVATE -Wall -Werror -ffunction-sections -fdata-sections + -Wno-unused-function $<$:-g -O0> $<$:-O2> )