Skip to content

Commit b94ee8f

Browse files
committed
cmake/zephyr: unify cmake rules for src/probe
Adding all source files in a single, giant zephyr/CMakeLists.txt is inconvenient and does not scale. Modify Zephyr rules to use definitions in src/probe/ instead. Link: #8260 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 8fcf316 commit b94ee8f

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/probe/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
# SPDX-License-Identifier: BSD-3-Clause
22

3-
add_local_sources(sof probe.c)
3+
if(CONFIG_PROBE STREQUAL "m")
4+
add_subdirectory(llext ${PROJECT_BINARY_DIR}/probe_llext)
5+
add_dependencies(app probe)
6+
elseif(CONFIG_PROBE)
7+
add_local_sources(sof probe.c)
8+
endif()

zephyr/CMakeLists.txt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ add_subdirectory(../src/ipc/ ipc_unused_install/)
210210
add_subdirectory(../src/lib/ lib_unused_install/)
211211
add_subdirectory(../src/library_manager/ library_manager_unused_install/)
212212
add_subdirectory(../src/logging/ logging_unused_install/)
213+
add_subdirectory(../src/probe/ probes_unused_install/)
213214
add_subdirectory(../src/samples/ samples_unused_install/)
214215
add_subdirectory(../src/schedule/ schedule_unused_install/)
215216
add_subdirectory(../src/trace/ trace_unused_install/)
@@ -481,14 +482,6 @@ zephyr_library_sources_ifdef(CONFIG_FAST_GET lib/fast-get.c)
481482

482483
# Optional SOF sources - depends on Kconfig - WIP
483484

484-
if(CONFIG_PROBE STREQUAL "m")
485-
add_subdirectory(${SOF_SRC_PATH}/probe/llext
486-
${PROJECT_BINARY_DIR}/probe_llext)
487-
add_dependencies(app probe)
488-
elseif(CONFIG_PROBE)
489-
zephyr_library_sources(${SOF_SRC_PATH}/probe/probe.c)
490-
endif()
491-
492485
zephyr_library_sources_ifdef(CONFIG_MULTICORE
493486
${SOF_SRC_PATH}/idc/idc.c
494487
)

0 commit comments

Comments
 (0)