Skip to content

Commit

Permalink
NuttX/CMakeLists.txt: Fix dependencies for NuttX executables
Browse files Browse the repository at this point in the history
Prior to this change all NuttX executables were rebuilt unconditionally,
this patch stops that.
  • Loading branch information
pussuw committed Dec 20, 2024
1 parent 9a93b68 commit 9af9413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion platforms/nuttx/NuttX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,19 @@ 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}"
BINDIR="${PX4_BINARY_DIR}/bin"
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()

###############################################################################
Expand Down

0 comments on commit 9af9413

Please sign in to comment.