From 9af941395149264e87c5746ab6d9bb06609a9c01 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Thu, 19 Dec 2024 14:53:53 +0200 Subject: [PATCH] NuttX/CMakeLists.txt: Fix dependencies for NuttX executables Prior to this change all NuttX executables were rebuilt unconditionally, this patch stops that. --- platforms/nuttx/NuttX/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platforms/nuttx/NuttX/CMakeLists.txt b/platforms/nuttx/NuttX/CMakeLists.txt index 5a3253cd7a78..042d175900e5 100644 --- a/platforms/nuttx/NuttX/CMakeLists.txt +++ b/platforms/nuttx/NuttX/CMakeLists.txt @@ -268,7 +268,7 @@ if (CONFIG_BUILD_KERNEL) get_property(CRT0_OBJ TARGET nuttx_crt0 PROPERTY IMPORTED_OBJECTS) - add_custom_target(nuttx_app_bins + add_custom_command(OUTPUT nuttx_install.stamp COMMAND mkdir -p ${PX4_BINARY_DIR}/bin COMMAND make -C ${NUTTX_SRC_DIR}/apps install --no-print-directory --silent ARCHCRT0OBJ="${CRT0_OBJ}" @@ -276,9 +276,11 @@ if (CONFIG_BUILD_KERNEL) TOPDIR="${NUTTX_DIR}" ELFLDNAME="${LDSCRIPT}" USERLIBS="${userlibs}" > ${CMAKE_CURRENT_BINARY_DIR}/nuttx_apps_install.log + COMMAND touch nuttx_install.stamp BYPRODUCTS ${PX4_BINARY_DIR}/bin/nsh DEPENDS ${nuttx_userlibs} nuttx_startup ) + add_custom_target(nuttx_app_bins DEPENDS nuttx_install.stamp) endif() ###############################################################################