Skip to content

Commit

Permalink
fix function docblock, check for unparsed arguments (#945)
Browse files Browse the repository at this point in the history
Signed-off-by: Dirk Thomas <[email protected]>
  • Loading branch information
dirk-thomas authored Dec 16, 2019
1 parent 26bc607 commit afbdfc1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions rclcpp_components/cmake/rclcpp_components_register_node.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Register an rclcpp component with the ament
# resource index and create an executable.
#
# usage: rclcpp_components_register_node(
# <target> PLUGIN <component> EXECUTABLE <node>)
#
# Register an rclcpp component with the ament
# resource index and create an executable.
#
# :param target: the shared library target
# :type target: string
# :param PLUGIN: the plugin name
Expand All @@ -27,6 +27,10 @@
#
macro(rclcpp_components_register_node target)
cmake_parse_arguments(ARGS "" "PLUGIN;EXECUTABLE" "" ${ARGN})
if(ARGS_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "rclcpp_components_register_node() called with unused "
"arguments: ${ARGS_UNPARSED_ARGUMENTS}")
endif()
set(component ${ARGS_PLUGIN})
set(node ${ARGS_EXECUTABLE})
_rclcpp_components_register_package_hook()
Expand Down

0 comments on commit afbdfc1

Please sign in to comment.