Repository navigation
Conversation
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
saikishor
force-pushed
the
add/version_header
branch
from
November 5, 2026 03:15
4f4b17e to
ad553c2
Compare
ahcorde
requested changes
Nov 5, 2026
Contributor
There was a problem hiding this comment.
- Stale header: I bumped package.xml from 6.0.2 to 6.1.0 and rebuilt with Makefiles. CMake didn't re-run, the header still said 6.0.2, and the version test still passed. With the CMAKE_CONFIGURE_DEPENDS line, the header updated to 6.1.0 and the test passed. Clean builds aren't affected.
- Test gap: I broke each of the six macro branches in turn, at both 6.0.2 and 6.1.1. Only the minor < MINOR mutations went undetected. Adding EXPECT_TRUE(URDFDOM_VERSION_GTE(M, m - 1, p + 1)); catches them.
Minor
README: tag 6.0.2 doesn't have the header, and the example fails there with a fatal missing-file error. A __has_include guard handled both cases correctly in my test.
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
saikishor
force-pushed
the
add/version_header
branch
from
November 5, 2026 13:50
a35a595 to
183b267
Compare
Collaborator
Author
|
@ahcorde regarding the __has_include tag, for what it's worth, i think it is wiser to backport this till humble sl everyone can condition things properly. What do you think?. If you want me to add that conditioning I can add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a CMake-generated
urdf_parser/version.hppheader (plus aurdf_parser/version.halias, matching the existing.h/.hppconvention), similar to theversion.hheaders generated forrclcppand other ROS 2 libraries. Downstream code can now check the urdfdom version at compile time.The values come from the version already parsed from
package.xmlin the top-levelCMakeLists.txt, so there is no new source of truth.Provided macros:
URDFDOM_VERSION_MAJOR,URDFDOM_VERSION_MINOR,URDFDOM_VERSION_PATCHURDFDOM_VERSION_STR(e.g."6.0.2")URDFDOM_VERSION_GTE(major, minor, patch), usable in#ifChanges
cmake/version.hpp.in: header template, configured into the build tree and installed next to the otherurdf_parserheadersBUILD_INTERFACEof all urdfdom targetsurdf_version_header_testchecks the macros against the build version and theGTElogic