Skip to content

Remove ament_export_include_directories and ament_export_libraries calls - #3305

Open
fujitatomoya wants to merge 1 commit into
rollingfrom
fujitatomoya/delete-old-style-cmake-exports
Open

fujitatomoya wants to merge 1 commit into
rollingfrom
fujitatomoya/delete-old-style-cmake-exports

Conversation

@fujitatomoya

Copy link
Copy Markdown
Collaborator

These packages already call ament_export_targets(), so the old-style CMake variable exports are redundant.

rclcpp_action and rclcpp_lifecycle relied on the old-style rclcpp_INCLUDE_DIRS variable to give cppcheck include hints. Take the include directories from the rclcpp::rclcpp target instead so the hint keeps working.

Fixes #3285

Description

Fixes # (issue)

Is this user-facing behavior change?

No

Did you use Generative AI?

Yes, Claude Fable 5.1

Additional Information

These packages already call ament_export_targets(), so the old-style CMake variable exports are redundant.

rclcpp_action and rclcpp_lifecycle relied on the old-style rclcpp_INCLUDE_DIRS
variable to give cppcheck include hints. Take the include directories from the
rclcpp::rclcpp target instead so the hint keeps working.

Fixes #3285

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Tomoya Fujita <fujita.tomoya@triorb.co.jp>
@fujitatomoya
fujitatomoya requested a review from sloretz October 2, 2026 08:10
@fujitatomoya fujitatomoya self-assigned this Oct 2, 2026
find_package(ament_lint_auto REQUIRED)
# Give cppcheck hints about macro definitions coming from outside this package
set(ament_cmake_cppcheck_ADDITIONAL_INCLUDE_DIRS ${rclcpp_INCLUDE_DIRS})
get_target_property(rclcpp_include_dirs rclcpp::rclcpp INTERFACE_INCLUDE_DIRECTORIES)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would silently become empty after the rclcpp change. now it reads the include directories off the modern target instead.

@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

ABI Compliance Check

✅ Verdict: compatible

Library Verdict Summary
libcomponent_manager.so ✅ compatible No ABI changes detected.
librclcpp.so ✅ compatible No ABI changes detected.
librclcpp_action.so ✅ compatible No ABI changes detected.
librclcpp_lifecycle.so ✅ compatible No ABI changes detected.
✅ libcomponent_manager.so — full abidiff report

Compared:

  • Base: lib-base/libcomponent_manager.so
  • Head: lib-pr/libcomponent_manager.so @ 09169cb
(empty report — no differences printed by abidiff)
✅ librclcpp.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp.so
  • Head: lib-pr/librclcpp.so @ 09169cb
(empty report — no differences printed by abidiff)
✅ librclcpp_action.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp_action.so
  • Head: lib-pr/librclcpp_action.so @ 09169cb
(empty report — no differences printed by abidiff)
✅ librclcpp_lifecycle.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp_lifecycle.so
  • Head: lib-pr/librclcpp_lifecycle.so @ 09169cb
(empty report — no differences printed by abidiff)

Updated for commit 09169cb · suppressions: /home/runner/work/_temp/ros2-abi-suppressions.txt

@anshika170-cmyk

Copy link
Copy Markdown

Hi I want to work on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete ament_export_include_directories() and ament_export_libraries() calls

3 participants