diff --git a/rclcpp_components/cmake/rclcpp_components_add_library_with_nodes.cmake b/rclcpp_components/cmake/rclcpp_components_add_library_with_nodes.cmake deleted file mode 100644 index bb1a675a73..0000000000 --- a/rclcpp_components/cmake/rclcpp_components_add_library_with_nodes.cmake +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2019 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# 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. - -# Create a target which builds a shared library and also creates a target -# which builds an executable -# usage: rclcpp_components_add_node( -# [EXCLUDE_FROM_ALL] [source2 ...]) - -# :param EXCLUDE_FROM_ALL: exclude the target from default build target -# :type EXCLUDE_FROM_ALL: boolean -# :param target: the name of the shared library target -# :type target: string -# :param sourceN: the list of source files for executable and shared library -# :type sourceN: list of strings -# -function(rclcpp_components_add_library_with_nodes target) - cmake_parse_arguments( - ARGS - "EXCLUDE_FROM_ALL" - "" - "" - ${ARGN}) - set(sourceN ${ARGS_UNPARSED_ARGUMENTS}) - add_library(${target} SHARED ${sourceN}) - string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPER) - target_compile_definitions(${target} PRIVATE "${PROJECT_NAME_UPPER}_BUILDING_DLL") - set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL ${ARGS_EXCLUDE_FROM_ALL}) -endfunction() diff --git a/rclcpp_components/cmake/rclcpp_components_register_node.cmake b/rclcpp_components/cmake/rclcpp_components_register_node.cmake index 3a87b63eaf..daa2db32c6 100644 --- a/rclcpp_components/cmake/rclcpp_components_register_node.cmake +++ b/rclcpp_components/cmake/rclcpp_components_register_node.cmake @@ -13,7 +13,7 @@ # limitations under the License. # # usage: rclcpp_components_register_node( -# ) +# PLUGIN EXECUTABLE ) # # Register an rclcpp component with the ament # resource index and create an executable. diff --git a/rclcpp_components/src/node_main.cpp.in b/rclcpp_components/src/node_main.cpp.in index 0ac40e2bf6..ffa437a86c 100644 --- a/rclcpp_components/src/node_main.cpp.in +++ b/rclcpp_components/src/node_main.cpp.in @@ -41,7 +41,7 @@ int main(int argc, char * argv[]) "", }; std::string className = "rclcpp_components::NodeFactoryTemplate<@CLASS_NAME@>"; - for (auto library : libraries) { + for (const auto & library : libraries) { RCLCPP_DEBUG(logger, "Loading library %s", library.c_str()); auto loader = new class_loader::ClassLoader(library); auto classes = loader->getAvailableClasses(); @@ -65,9 +65,6 @@ int main(int argc, char * argv[]) exec.remove_node(wrapper.get_node_base_interface()); } node_wrappers.clear(); - rclcpp::shutdown(); - - return 0; }