mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 00:03:33 +08:00
cmake: avoid GLOB for *.msg files and use an explicit .msg file enumeration
This makes sure that adding & removing of .msg files is handled properly by the build system.
This commit is contained in:
@@ -415,6 +415,13 @@ function(px4_generate_messages)
|
||||
)
|
||||
set_source_files_properties(${msg_source_files_out} PROPERTIES GENERATED TRUE)
|
||||
|
||||
# We remove uORBTopics.cpp to make sure the generator is re-run, which is
|
||||
# necessary when a .msg file is removed and because uORBTopics.cpp depends
|
||||
# on all topics.
|
||||
execute_process(COMMAND rm uORBTopics.cpp
|
||||
WORKING_DIRECTORY ${msg_source_out_path}
|
||||
ERROR_QUIET)
|
||||
|
||||
# multi messages for target OS
|
||||
set(msg_multi_out_path
|
||||
${CMAKE_BINARY_DIR}/src/platforms/${OS}/px4_messages)
|
||||
|
||||
Reference in New Issue
Block a user