From ac46050020039942188f8d25406d5d466823766f Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Tue, 21 Apr 2026 11:09:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=BE=85=E5=90=88=E3=80=91=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=AE=8F=E5=AE=9A=E4=B9=89=E5=8F=AF=E8=A7=81=E6=80=A7?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Bingoo/CMakeLists.txt | 4 ++-- Bingoo/main/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Bingoo/CMakeLists.txt b/Bingoo/CMakeLists.txt index e89e87b..ebe36d3 100644 --- a/Bingoo/CMakeLists.txt +++ b/Bingoo/CMakeLists.txt @@ -49,17 +49,17 @@ function(add_module MOD_NAME MOD_PATH) if(${BUILD_${MOD_UPPER}}) set(BUILD_${MOD_UPPER}_HAS_TEST ${HAS_TEST} CACHE INTERNAL "Has test support") - add_subdirectory(${MOD_PATH}) list(APPEND GLOBAL_ENABLED_MODULES ${MOD_NAME}) list(APPEND GLOBAL_ENABLED_MACROS BUILD_${MOD_UPPER}) message(STATUS "[Root] Enabled module(TestSupport: ${HAS_TEST}): ${MOD_NAME} (Default: ${DEFAULT_STATE}) -> Macro: BUILD_${MOD_UPPER}") set(GLOBAL_ENABLED_MODULES ${GLOBAL_ENABLED_MODULES} PARENT_SCOPE) set(GLOBAL_ENABLED_MACROS ${GLOBAL_ENABLED_MACROS} PARENT_SCOPE) + add_subdirectory(${MOD_PATH}) endif() endfunction() add_module(base base ON OFF) -add_module(common common ON OFF) +add_module(CANmotor CANmotor ON OFF) add_module(controller controller OFF ON) add_module(motor motor OFF ON) add_module(ctrl2 ctrl2 OFF ON) diff --git a/Bingoo/main/CMakeLists.txt b/Bingoo/main/CMakeLists.txt index 7127d47..4b98222 100644 --- a/Bingoo/main/CMakeLists.txt +++ b/Bingoo/main/CMakeLists.txt @@ -42,7 +42,7 @@ endif() if(DEFINED GLOBAL_ENABLED_MACROS AND NOT GLOBAL_ENABLED_MACROS STREQUAL "") message(STATUS "[Main] Defining macros: ${GLOBAL_ENABLED_MACROS}") - target_compile_definitions(${TARGET_NAME} PRIVATE ${GLOBAL_ENABLED_MACROS}) + target_compile_definitions(${TARGET_NAME} PUBLIC ${GLOBAL_ENABLED_MACROS}) endif() target_compile_options(${TARGET_NAME}