zephyr/subsys/shell/modules/kernel_service/CMakeLists.txt
Yong Cong Sin 83212147b2 shell: kernel_service: reorg the commands
Split the `kernel_service.c` into multiple subcommand files,
each file would register with the main `kernel` cmd based on
the dependencies in Kconfig/CMakeLists.txt.

This greatly reduces the number of precompiler directives.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-09-17 20:12:33 -04:00

22 lines
453 B
CMake

# Copyright (c) 2024 Meta Platforms
# SPDX-License-Identifier: Apache-2.0
zephyr_sources(
# Main command
kernel_shell.c
# Subcommand starts here
cycles.c
sleep.c
uptime.c
version.c
)
# Conditional subcommands
zephyr_sources_ifdef(CONFIG_SYS_HEAP_RUNTIME_STATS heap.c)
zephyr_sources_ifdef(CONFIG_LOG_RUNTIME_FILTERING log-level.c)
zephyr_sources_ifdef(CONFIG_REBOOT reboot.c)
add_subdirectory_ifdef(CONFIG_KERNEL_THREAD_SHELL thread)