From 57befb87e165fc660809b30fba1a28e587263a4b Mon Sep 17 00:00:00 2001 From: Scott K Logan Date: Fri, 12 Feb 2021 10:08:29 -0800 Subject: [PATCH] Shorten some excessively long lines of CMake (#571) The line length enforcement in ament_lint_cmake has been broken for some time, but will be fixed by ament/ament_lint#236. This change brings this package into compliance with a 120 column limit. Signed-off-by: Scott K Logan --- ...sidl_cmake_export_typesupport_libraries-extras.cmake.in | 7 +++++-- rosidl_cmake/cmake/rosidl_target_interfaces.cmake | 6 ++++-- rosidl_runtime_c/CMakeLists.txt | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/rosidl_cmake/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake.in b/rosidl_cmake/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake.in index 3f543c246..13bc3038b 100644 --- a/rosidl_cmake/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake.in +++ b/rosidl_cmake/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake.in @@ -23,10 +23,13 @@ if(NOT _exported_typesupport_libraries STREQUAL "") if(NOT _lib) # the library wasn't found - message(FATAL_ERROR "Package '@PROJECT_NAME@' exports the typesupport library '${_library}' which couldn't be found") + message(FATAL_ERROR + "Package '@PROJECT_NAME@' exports the typesupport library '${_library}' which couldn't be found") elseif(NOT IS_ABSOLUTE "${_lib}") # the found library must be an absolute path - message(FATAL_ERROR "Package '@PROJECT_NAME@' found the typesupport library '${_library}' at '${_lib}' which is not an absolute path") + message(FATAL_ERROR + "Package '@PROJECT_NAME@' found the typesupport library '${_library}' at '${_lib}' " + "which is not an absolute path") elseif(NOT EXISTS "${_lib}") # the found library must exist message(FATAL_ERROR "Package '@PROJECT_NAME@' found the typesupport library '${_lib}' which doesn't exist") diff --git a/rosidl_cmake/cmake/rosidl_target_interfaces.cmake b/rosidl_cmake/cmake/rosidl_target_interfaces.cmake index c4d29c378..19d3817ea 100644 --- a/rosidl_cmake/cmake/rosidl_target_interfaces.cmake +++ b/rosidl_cmake/cmake/rosidl_target_interfaces.cmake @@ -34,10 +34,12 @@ function(rosidl_target_interfaces target interface_target typesupport_name) "rosidl_target_interfaces() called with unused arguments: ${ARGN}") endif() if(NOT TARGET ${target}) - message(FATAL_ERROR "rosidl_target_interfaces() the first argument '${target}' must be a valid target name") + message(FATAL_ERROR + "rosidl_target_interfaces() the first argument '${target}' must be a valid target name") endif() if(NOT TARGET ${interface_target}) - message(FATAL_ERROR "rosidl_target_interfaces() the second argument '${interface_target}' must be a valid target name") + message(FATAL_ERROR + "rosidl_target_interfaces() the second argument '${interface_target}' must be a valid target name") endif() set(typesupport_target "${interface_target}__${typesupport_name}") if(NOT TARGET ${typesupport_target}) diff --git a/rosidl_runtime_c/CMakeLists.txt b/rosidl_runtime_c/CMakeLists.txt index 061afaad9..3d4cdd027 100644 --- a/rosidl_runtime_c/CMakeLists.txt +++ b/rosidl_runtime_c/CMakeLists.txt @@ -53,7 +53,8 @@ if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) find_package(performance_test_fixture REQUIRED) # Give cppcheck hints about macro definitions coming from outside this package - get_target_property(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS performance_test_fixture::performance_test_fixture INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS performance_test_fixture::performance_test_fixture + INTERFACE_INCLUDE_DIRECTORIES) ament_lint_auto_find_test_dependencies() # For gtest