ioc changed but not tested

This commit is contained in:
TuxMonkey
2026-07-20 15:39:06 +08:00
parent bd7f8f2962
commit d13729b162
6 changed files with 63 additions and 37 deletions

View File

@@ -155,7 +155,7 @@ link_directories(
# A. 头文件管理:全自动模式,扫描 User_Code 下的所有头文件。
# ------------------------------------------------------------------------------
message(NOTICE ">> [Searching All Header] 正在全自动递归扫描 User_Code 下所有头文件路径...")
file(GLOB_RECURSE USER_HEADERS "${CMAKE_SOURCE_DIR}/User_Code/*.h" "${CMAKE_SOURCE_DIR}/User_Code/*.hpp")
file(GLOB_RECURSE USER_HEADERS CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/User_Code/*.h" "${CMAKE_SOURCE_DIR}/User_Code/*.hpp")
foreach (header ${USER_HEADERS})
get_filename_component(dir ${header} DIRECTORY) # 获取头文件所在目录
@@ -174,7 +174,7 @@ message(NOTICE ">> [INFO] 正在全自动递归扫描 User_Code/application下
# 1. 添加通用代码 (BSP & Module & Application 通用框架)
# 包含 bsp, module 以及 application 下的通用组件
file(GLOB_RECURSE COMMON_SOURCES
file(GLOB_RECURSE COMMON_SOURCES CONFIGURE_DEPENDS
"${PROJECT_SOURCE_DIR}/User_Code/bsp/*.c"
"${PROJECT_SOURCE_DIR}/User_Code/bsp/*.cpp"
"${PROJECT_SOURCE_DIR}/User_Code/module/*.c"
@@ -269,7 +269,7 @@ endif()
if(ACTIVE_APP_DIR)
if(EXISTS "${ACTIVE_APP_DIR}")
# 添加该兵种目录下的所有源码
file(GLOB_RECURSE APP_SOURCES "${ACTIVE_APP_DIR}/*.c" "${ACTIVE_APP_DIR}/*.cpp")
file(GLOB_RECURSE APP_SOURCES CONFIGURE_DEPENDS "${ACTIVE_APP_DIR}/*.c" "${ACTIVE_APP_DIR}/*.cpp")
# --- 新增:统计文件数量 ---
list(LENGTH APP_SOURCES APP_SOURCES_COUNT)
@@ -294,4 +294,4 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
# RM_REFEREE
)
)