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 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2024-05-28 16:45:43 +08:00 committed by Alin Jerpelea
parent 41dba46c1d
commit b325ae6391
1 changed files with 4 additions and 0 deletions

View File

@ -161,6 +161,10 @@ function(nuttx_add_application)
PRIVATE PRIVATE
$<GENEX_EVAL:$<TARGET_PROPERTY:nuttx,NUTTX_ELF_APP_COMPILE_OPTIONS>>) $<GENEX_EVAL:$<TARGET_PROPERTY:nuttx,NUTTX_ELF_APP_COMPILE_OPTIONS>>)
endif() endif()
else()
set(TARGET "apps_${NAME}")
add_custom_target(${TARGET})
set_property(GLOBAL APPEND PROPERTY NUTTX_APPS_ONLY_REGISTER ${TARGET})
endif() endif()
# store parameters into properties (used during builtin list generation) # store parameters into properties (used during builtin list generation)