Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten some excessively long lines of CMake #571

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 4 additions & 2 deletions rosidl_cmake/cmake/rosidl_target_interfaces.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
3 changes: 2 additions & 1 deletion rosidl_runtime_c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down