Skip to content

Cleanup CMakeLists.txt - #3824

Draft
mosfet80 wants to merge 4 commits into
moveit:mainfrom
mosfet80:patch-32
Draft

Cleanup CMakeLists.txt#3824
mosfet80 wants to merge 4 commits into
moveit:mainfrom
mosfet80:patch-32

Conversation

@mosfet80

@mosfet80 mosfet80 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

Removed several unnecessary dependencies from target_link_libraries for various executables and libraries in CMakeLists.txt.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

Summary by CodeRabbit

  • Refactor
    • Streamlined build configurations for Servo libraries, demonstrations, keyboard controls, and tests by removing redundant dependencies.
    • Retained the dependencies required for core Servo functionality, ROS integration, demonstrations, and testing.
    • No changes were made to user-facing behavior, available features, or public interfaces.

Removed several unnecessary dependencies from target_link_libraries for various executables and libraries in CMakeLists.txt.
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 27397af9-e292-4fae-801c-2b9ce35115a0

📥 Commits

Reviewing files that changed from the base of the PR and between 5296d03 and 01378e0.

📒 Files selected for processing (1)
  • moveit_ros/moveit_servo/CMakeLists.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • moveit_ros/moveit_servo/CMakeLists.txt

Included review availability: Your plan provides up to 3 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The Servo CMake configuration removes redundant link dependencies from Servo libraries, demos, the keyboard executable, and tests. Each target retains only its required direct dependencies.

Servo CMake dependency cleanup

Layer / File(s) Summary
Servo library link dependencies
moveit_ros/moveit_servo/CMakeLists.txt
The C++ Servo library now links its parameter library and moveit_ros_planning. The ROS Servo library retains the C++ library, control_msgs, realtime_tools, and std_srvs.
Demo and test link dependencies
moveit_ros/moveit_servo/CMakeLists.txt
The demos, keyboard executable, utility test, and C++ integration tests use reduced dependency lists. The ROS integration test retains control_msgs, moveit_core, and trajectory_msgs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 01378

This localized CMake cleanup changes target dependency declarations without any identified merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: cleaning up the moveit_servo CMakeLists.txt dependencies.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.75%. Comparing base (7ae8653) to head (d5eaa4a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3824      +/-   ##
==========================================
- Coverage   48.76%   48.75%   -0.00%     
==========================================
  Files         730      730              
  Lines       62470    62470              
  Branches     7609     7609              
==========================================
- Hits        30455    30454       -1     
- Misses      32015    32016       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rhaschke rhaschke left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems to work. Nice cleanup! Thanks.

@mergify

mergify Bot commented Aug 19, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@rhaschke

Copy link
Copy Markdown
Contributor

@mosfet80: Do you plan to look into other CMakefiles too?
If so, that would be great and I would like to collect all corresponding commits within this PR.
Thanks a lot in advance.

@mosfet80

Copy link
Copy Markdown
Contributor Author

@mosfet80: Do you plan to look into other CMakefiles too? If so, that would be great and I would like to collect all corresponding commits within this PR. Thanks a lot in advance.

I also plan to optimize the other packages included in moveit2. Unfortunately, I'm busy with other activities and won't be able to finish it this month.

@rhaschke

Copy link
Copy Markdown
Contributor

Great. As this cleanup is not at all urgent, I'm happy to wait until all cleanups are collected here. I'll switch the status to draft.

@rhaschke
rhaschke marked this pull request as draft August 20, 2026 09:09
@rhaschke rhaschke changed the title Clean up moveit_servo CMakeLists.txt Cleanup CMakeLists.txt Aug 20, 2026

@christian-rauch christian-rauch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the cleanup. I would prefer if you keep the line-by-line target list for easier readability.

Comment on lines +48 to +49
target_link_libraries(moveit_servo_lib_cpp moveit_servo_lib_parameters
moveit_ros_planning::moveit_ros_planning)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you keep the CMake targets per line (here and anywhere else)? This makes it easier readable, and you will see in the diff which targets actually get removed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants