mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 04:23:34 +08:00
list_vmd_make_targets and list_cmake_targets
* This allows one to run 'make posix list_vmd_make_targets' and get output like >make posix list_vmd_make_targets [...] -- Build files have been written to: /usr/src/debian/px4/Firmware/Firmware.git/build_posix_sitl_default PX4 CONFIG: /usr/src/debian/px4/Firmware/Firmware.git/build_posix_sitl_default Scanning dependencies of target list_vmd_make_targets [100%] List of acceptable 'posix_sitl_default' <viewer_model_debugger> targets: none none_iris none_iris_opt_flow none_tailsitter [...] replay_solo_valgrind replay_typhoon_h480_valgrind [100%] Built target list_vmd_make_targets Or, run 'make list_vmd_make_targets' from the build_posix_* directory. * This adds the list_cmake_targets make target to print all cmake targets that one can match with PX4_NO_OPTIMIZATION. PX4_NO_OPTIMIZATION is ignored (do optimization as normal) when the CONFIG isn't posix_sitl_*. * Add comment in Makefile on how/where to find all targets.
This commit is contained in:
@@ -152,6 +152,7 @@ set_target_properties(sitl_gazebo PROPERTIES EXCLUDE_FROM_ALL TRUE)
|
||||
set(viewers none jmavsim gazebo replay)
|
||||
set(debuggers none gdb lldb ddd valgrind)
|
||||
set(models none iris iris_opt_flow tailsitter standard_vtol plane solo typhoon_h480)
|
||||
set(all_posix_vmd_make_targets)
|
||||
foreach(viewer ${viewers})
|
||||
foreach(debugger ${debuggers})
|
||||
foreach(model ${models})
|
||||
@@ -180,6 +181,7 @@ foreach(viewer ${viewers})
|
||||
WORKING_DIRECTORY ${SITL_WORKING_DIR}
|
||||
USES_TERMINAL
|
||||
)
|
||||
list(APPEND all_posix_vmd_make_targets ${_targ_name})
|
||||
if (viewer STREQUAL "gazebo")
|
||||
add_dependencies(${_targ_name} sitl_gazebo)
|
||||
endif()
|
||||
@@ -187,6 +189,13 @@ foreach(viewer ${viewers})
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
px4_join(OUT posix_vmd_make_target_list LIST ${all_posix_vmd_make_targets} GLUE "\\n")
|
||||
add_custom_target(list_vmd_make_targets
|
||||
COMMAND sh -c "printf \"${posix_vmd_make_target_list}\\n\""
|
||||
COMMENT "List of acceptable '${CONFIG}' <viewer_model_debugger> targets:"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
#=============================================================================
|
||||
# install
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user