Skip to content

Commit

Permalink
new macro to replace add_node
Browse files Browse the repository at this point in the history
  • Loading branch information
skucheria committed Jul 15, 2019
1 parent b39d28e commit 600565a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# :param sourceN: the list of source files for executable and shared library
# :type sourceN: list of strings
#
function(rclcpp_components_add_multiple_nodes target)
function(rclcpp_components_add_library_with_nodes target)
cmake_parse_arguments(
ARGS
"EXCLUDE_FROM_ALL"
Expand Down
11 changes: 8 additions & 3 deletions rclcpp_components/cmake/rclcpp_components_register_node.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@
# :type node: string
#
macro(rclcpp_components_register_node target)
set(ARGS ${ARGN})
list(GET ARGS 0 component)
list(GET ARGS 1 node)
cmake_parse_arguments(
ARGS
""
"PLUGIN;EXECUTABLE"
""
${ARGN})
set(component ${ARGS_PLUGIN})
set(node ${ARGS_EXECUTABLE})
_rclcpp_components_register_package_hook()
if(WIN32)
set(_path "bin")
Expand Down
1 change: 1 addition & 0 deletions rclcpp_components/rclcpp_components-extras.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ include("${rclcpp_components_DIR}/rclcpp_components_register_nodes.cmake")
include("${rclcpp_components_DIR}/rclcpp_components_add_node.cmake")
include("${rclcpp_components_DIR}/rclcpp_components_add_multiple_nodes.cmake")
include("${rclcpp_components_DIR}/rclcpp_components_register_node.cmake")
include("${rclcpp_components_DIR}/rclcpp_components_add_library_with_nodes.cmake")

0 comments on commit 600565a

Please sign in to comment.