forked from Archive/PX4-Autopilot
Changed sitl targets to be easier to call from make.
This commit is contained in:
parent
f2b76a065c
commit
318144ee8b
3
Makefile
3
Makefile
|
@ -161,7 +161,8 @@ clean:
|
|||
|
||||
# targets handled by cmake
|
||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak \
|
||||
run_sitl config
|
||||
run_cmake_config config gazebo gazebo_gdb gazebo_lldb jmavsim \
|
||||
jmavsim_gdb jmavsim_lldb
|
||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -24,12 +24,32 @@ else()
|
|||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(run_sitl
|
||||
add_custom_target(run_config
|
||||
COMMAND Tools/sitl_run.sh "${config_sitl_rcS}" "${config_sitl_debugger}"
|
||||
"${config_sitl_viewer}" "${CMAKE_BINARY_DIR}"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
USES_TERMINAL
|
||||
)
|
||||
add_dependencies(run_sitl mainapp)
|
||||
add_dependencies(run_config mainapp)
|
||||
|
||||
foreach(viewer jmavsim gazebo)
|
||||
foreach(debugger none gdb lldb)
|
||||
message(STATUS "viewer: ${viewer}")
|
||||
message(STATUS "debugger: ${debugger}")
|
||||
if (debugger STREQUAL "none")
|
||||
set(_targ_name "${viewer}")
|
||||
else()
|
||||
set(_targ_name "${viewer}_${debugger}")
|
||||
endif()
|
||||
add_custom_target(${_targ_name}
|
||||
COMMAND Tools/sitl_run.sh "${config_sitl_rcS}"
|
||||
"${debugger}"
|
||||
"${viewer}" "${CMAKE_BINARY_DIR}"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
USES_TERMINAL
|
||||
)
|
||||
add_dependencies(${_targ_name} mainapp)
|
||||
endforeach()
|
||||
endforeach()
|
||||
|
||||
# vim: set noet ft=cmake fenc=utf-8 ff=unix :
|
||||
|
|
Loading…
Reference in New Issue