Skip to content

Conversation

@scpeters
Copy link
Contributor

Currently the package version is set in both package.xml and the CMakeLists.txt file and it's easy for them to get out of sync. This updates the cmake code to extract the version string from the package.xml file using a regular expression and passing it to the cmake project() call. This approach implements the suggestion by @clalancette in ros/urdfdom#233 (review) and is copied from ros/urdfdom#236.

Use regex to match version string.
Copied from ros/urdfdom#236.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@ahcorde
Copy link
Contributor

ahcorde commented Dec 18, 2025

Pulls: #92
Gist: https://gist.githubusercontent.com/ahcorde/3852e901e337386cbbce474138693882/raw/10c30ad60becfdfacf9a894bf24130fb45a70ae0/ros2.repos
BUILD args: --packages-above-and-dependencies urdfdom_headers
TEST args: --packages-above urdfdom_headers
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17823

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit 45835cc into rolling Dec 18, 2025
2 checks passed
@ahcorde ahcorde deleted the scpeters/cmake_version_from_package_xml branch December 18, 2025 21:23
@scpeters scpeters mentioned this pull request Dec 19, 2025
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.

4 participants