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:
Beat Küng
2016-05-17 09:08:13 +02:00
committed by Lorenz Meier
parent f6f47e3362
commit 7f65e01d07
4 changed files with 141 additions and 1 deletions
+7
View File
@@ -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)