Skip to content

Commit

Permalink
revisions
Browse files Browse the repository at this point in the history
Signed-off-by: Siddharth Kucheria <kucheria@usc.edu>
  • Loading branch information
skucheria committed Jul 23, 2019
1 parent 793675d commit 5aaee75
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions rclcpp_components/cmake/rclcpp_components_register_node.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#
# usage: rclcpp_components_register_node(
# <target> PLUGIN <component> EXECUTABLE <node>)
# <target> PLUGIN <component> EXECUTABLE <node>)
#
# Register an rclcpp component with the ament
# resource index and create an executable.
Expand All @@ -26,12 +26,7 @@
# :type EXECUTABLE: string
#
macro(rclcpp_components_register_node target)
cmake_parse_arguments(
ARGS
""
"PLUGIN;EXECUTABLE"
""
${ARGN})
cmake_parse_arguments(ARGS "" "PLUGIN;EXECUTABLE" "" ${ARGN})
set(component ${ARGS_PLUGIN})
set(node ${ARGS_EXECUTABLE})
_rclcpp_components_register_package_hook()
Expand All @@ -49,16 +44,6 @@ macro(rclcpp_components_register_node target)
configure_file(${rclcpp_components_NODE_TEMPLATE}
${PROJECT_BINARY_DIR}/rclcpp_components/node_main_${node}.cpp @ONLY)
add_executable(${node} ${PROJECT_BINARY_DIR}/rclcpp_components/node_main_${node}.cpp)
set(lib ${target})
# Needed so symbols aren't dropped if not used
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(lib
"-Wl,--no-as-needed"
${target}
"-Wl,--as-needed")
endif()
target_link_libraries(${node}
${lib})
ament_target_dependencies(${node}
"rclcpp"
"class_loader"
Expand Down

0 comments on commit 5aaee75

Please sign in to comment.