use CmakeLists scope to generate te XML file

- the only difference really is, that scope (the configuration.cmake) is already passed
  to px_process_params via the argument --scope. The Paths in --scope are evaluated w.r.t
  the path to src provided via the -s /--src-path argument.
- if no --scope is proveided. the Old scheme by simply walking the full --src-path directory
  is applied
This commit is contained in:
mazahner
2016-12-22 14:16:23 +01:00
committed by Lorenz Meier
parent c72de874d6
commit 6fe9b8e543
9 changed files with 130 additions and 94 deletions

View File

@@ -1014,7 +1014,7 @@ endfunction()
function(px4_generate_parameters_xml)
px4_parse_function_args(
NAME px4_generate_parameters_xml
ONE_VALUE OUT BOARD
ONE_VALUE OUT BOARD SCOPE
REQUIRED OUT BOARD
ARGN ${ARGN})
set(path ${PX4_SOURCE_DIR}/src)
@@ -1023,7 +1023,7 @@ function(px4_generate_parameters_xml)
)
add_custom_command(OUTPUT ${OUT}
COMMAND ${PYTHON_EXECUTABLE} ${PX4_SOURCE_DIR}/Tools/px_process_params.py
-s ${path} --board CONFIG_ARCH_${BOARD} --xml --inject-xml
-s ${path} --board CONFIG_ARCH_${BOARD} --xml --inject-xml --scope ${SCOPE}
DEPENDS ${param_src_files}
)
set(${OUT} ${${OUT}} PARENT_SCOPE)

View File

@@ -435,7 +435,7 @@ function(px4_nuttx_add_romfs)
--obj romfs.o
--var romfs_img
--bin romfs.bin
DEPENDS ${romfs_src_files} ${extras}
DEPENDS ${romfs_src_files} ${extras} ${optional_files}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
add_library(${OUT} STATIC romfs.o)