Tacha-S / colcon-lint

Colcon extension for linting ROS package dependencies
Apache License 2.0
17 stars 4 forks source link

Validate build_depend #1

Closed Tacha-S closed 1 year ago

Tacha-S commented 1 year ago

Validate that the dependencies described in CMakeLists.txt are written in package.xml.

If they were directly described, they would be easy to detect,

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(tf2_ros REQUIRED)

but if they are put in variables or find_package is called in macro,

set(DEPENDENCIES
  geometry_msgs
  nav_msgs
  nav2_util
  rclcpp
  tf2_eigen
)

find_package(ament_cmake REQUIRED)
foreach(Dependency IN ITEMS ${DEPENDENCIES})
  find_package(${Dependency} REQUIRED)
endforeach()
ament_auto_find_build_dependencies()

it is necessary to analyze CMakeLists.txt in more detail.

Tacha-S commented 1 year ago

Resolved by a0538e65ecd123540024f5de26ded6d29a3437e9