Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an optional list of dependencies that will trigger regeneration when changed #137

Open
wants to merge 1 commit into
base: melodic-devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions cmake/dynamic_reconfigure-macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ macro(generate_dynamic_reconfigure_options)
# ensure that package destination variables are defined
catkin_destinations()

# parse arguments to separate configuration files from dependencies
cmake_parse_arguments(CFG_FILES "" "" "DEPENDS" ${ARGN})

set(_autogen "")
foreach(_cfg ${ARGN})
foreach(_cfg ${CFG_FILES_UNPARSED_ARGUMENTS})
# Construct the path to the .cfg file
set(_input ${_cfg})
if(NOT IS_ABSOLUTE ${_input})
Expand Down Expand Up @@ -70,7 +73,7 @@ macro(generate_dynamic_reconfigure_options)
add_custom_command(OUTPUT
${_output_cpp} ${_output_dox} ${_output_usage} ${_output_py} ${_output_wikidoc}
COMMAND ${_cmd}
DEPENDS ${_input} ${gencfg_build_files}
DEPENDS ${_input} ${gencfg_build_files} ${CFG_FILES_DEPENDS}
COMMENT "Generating dynamic reconfigure files from ${_cfg}: ${_output_cpp} ${_output_py}"
)

Expand Down