From b325ae639156eca231474fa32a2f1e8b841b9214 Mon Sep 17 00:00:00 2001 From: xuxin19 Date: Tue, 28 May 2024 16:45:43 +0800 Subject: [PATCH] cmake: add_application supports only registration but not compilation for sources that have implemented multiple prog_main, there is a situation where you don't need to add source files but need to register. the add_application method is enhanced so that it can be registered without entering SRCS. Signed-off-by: xuxin19 --- cmake/nuttx_add_application.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/nuttx_add_application.cmake b/cmake/nuttx_add_application.cmake index fc12f28518..4701987c6b 100644 --- a/cmake/nuttx_add_application.cmake +++ b/cmake/nuttx_add_application.cmake @@ -161,6 +161,10 @@ function(nuttx_add_application) PRIVATE $>) endif() + else() + set(TARGET "apps_${NAME}") + add_custom_target(${TARGET}) + set_property(GLOBAL APPEND PROPERTY NUTTX_APPS_ONLY_REGISTER ${TARGET}) endif() # store parameters into properties (used during builtin list generation)