mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 17:19:06 +08:00
events: pass relative paths plus base path to source parser script (#22551)
* events: pass relative paths plus base path to source parser script to work around maximum Makefile command lenght limits. * events: correct cmake comment typo Co-authored-by: Beat Küng <beat-kueng@gmx.net> --------- Co-authored-by: Beat Küng <beat-kueng@gmx.net>
This commit is contained in:
parent
f38fe24a98
commit
6ffc5a9eae
@ -35,13 +35,21 @@ px4_add_git_submodule(TARGET git_libevents PATH "libevents")
|
||||
|
||||
get_property(all_px4_src_files GLOBAL PROPERTY PX4_SRC_FILES)
|
||||
|
||||
# Use relative path list to work around Makefile command character limit
|
||||
set(all_px4_src_files_relative "")
|
||||
foreach(f ${all_px4_src_files})
|
||||
file(RELATIVE_PATH relative_path ${PX4_SOURCE_DIR}/src ${f})
|
||||
list(APPEND all_px4_src_files_relative "${relative_path}")
|
||||
endforeach(f)
|
||||
|
||||
set(generated_events_dir ${PX4_BINARY_DIR}/events)
|
||||
set(generated_events_px4_file ${generated_events_dir}/px4.json)
|
||||
set(generated_events_common_enums_file ${generated_events_dir}/common_with_enums.json)
|
||||
add_custom_command(OUTPUT ${generated_events_px4_file}
|
||||
COMMAND ${CMAKE_COMMAND} -E make_directory ${generated_events_dir}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_events.py
|
||||
--src-path ${all_px4_src_files}
|
||||
--base-path ${PX4_SOURCE_DIR}/src
|
||||
--src-path ${all_px4_src_files_relative}
|
||||
--json ${generated_events_px4_file} #--verbose
|
||||
DEPENDS
|
||||
${all_px4_src_files}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user