Kernel and buildscript improvements (#477)
* **New Features** * Centralized module management with global symbol resolution * Level-aware logging with colored prefixes and millisecond timestamps * **Breaking Changes** * ModuleParent hierarchy and getModuleParent() removed * Logging API and adapter model replaced; LogLevel-driven log_generic signature changed * **Improvements** * Unified, simplified module registration across build targets * Tests updated to reflect new module lifecycle and global symbol resolution
This commit is contained in:
committed by
GitHub
parent
1a61eac8e0
commit
a935410f82
@@ -1,31 +1,23 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/../Buildscripts/module.cmake")
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
|
||||
list(APPEND REQUIRES_LIST
|
||||
TactilityFreeRtos
|
||||
TactilityKernel
|
||||
mbedtls
|
||||
)
|
||||
|
||||
if (DEFINED ENV{ESP_IDF_VERSION})
|
||||
file(GLOB_RECURSE SOURCE_FILES Source/*.c*)
|
||||
|
||||
idf_component_register(
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "Include/"
|
||||
REQUIRES TactilityFreeRtos TactilityKernel mbedtls nvs_flash esp_rom
|
||||
list(APPEND REQUIRES_LIST
|
||||
nvs_flash esp_rom
|
||||
)
|
||||
endif ()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
target_compile_options(${COMPONENT_LIB} PUBLIC -Wno-unused-variable)
|
||||
endif()
|
||||
else()
|
||||
file(GLOB_RECURSE SOURCES "Source/*.c*")
|
||||
|
||||
add_library(TactilityCore OBJECT)
|
||||
|
||||
target_sources(TactilityCore
|
||||
PRIVATE ${SOURCES}
|
||||
)
|
||||
|
||||
target_include_directories(TactilityCore PUBLIC Include/)
|
||||
|
||||
target_link_libraries(TactilityCore PUBLIC
|
||||
TactilityFreeRtos
|
||||
TactilityKernel
|
||||
mbedtls
|
||||
)
|
||||
endif()
|
||||
tactility_add_module(TactilityCore
|
||||
SRCS ${SOURCE_FILES}
|
||||
INCLUDE_DIRS "Include/"
|
||||
REQUIRES ${REQUIRES_LIST}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user