-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide catkin package.xml per ROS REP 136 #409
Provide catkin package.xml per ROS REP 136 #409
Conversation
package.xml
Outdated
<name>fcl</name> | ||
<version>0.6.0</version> | ||
<description>FCL: the Flexible Collision Library</description> | ||
<maintainer email="[email protected]">Jeongseok Lee</maintainer> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not currently maintaining FCL actively. I guess @sherm1 or @SeanCurtis-TRI would be more make sense to be the maintainer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I changed it to both of them.
We are creating an |
A few lines in CMake are sufficient to parse package.xml and extract the version: FILE(READ package.xml PACKAGE_XML)
STRING(REGEX MATCH "<version>[0-9]+\\.[0-9]+\\.[0-9]+</version>" DIRTY_VERSION_STRING ${PACKAGE_XML})
STRING(REGEX REPLACE "^<version>([0-9]+)\\.[0-9]+\\.[0-9]+</version>" "\\1" major_vers "${DIRTY_VERSION_STRING}")
STRING(REGEX REPLACE "^<version>[0-9]+\\.([0-9])+\\.[0-9]+</version>" "\\1" minor_vers "${DIRTY_VERSION_STRING}")
STRING(REGEX REPLACE "^<version>[0-9]+\\.[0-9]+\\.([0-9]+)</version>" "\\1" patch_vers "${DIRTY_VERSION_STRING}") Note if CMake >= 3.9, you can catch groups in regular expression using |
Done |
Excellent! Done. |
I have addressed the issues I think. Thanks to TRI for supporting FCL! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Andy. This looks good to me but I don't know much about this build system. Can we get a quick review by a more-knowledgeable person? @j-rivero @scpeters, or @jamiesnape maybe?
Reviewed 1 of 2 files at r1, 2 of 2 files at r2.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SeanCurtis-TRI and @sherm1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @c-andy-martin, @SeanCurtis-TRI, and @sherm1)
CMakeModules/FCLVersion.cmake, line 2 at r2 (raw file):
# set the version in a way CMake can use FILE(READ package.xml PACKAGE_XML)
Use lowercase for FILE
and STRING
.
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @jamiesnape, @SeanCurtis-TRI, and @sherm1)
CMakeModules/FCLVersion.cmake, line 2 at r2 (raw file):
Previously, jamiesnape (Jamie Snape) wrote…
Use lowercase for
FILE
andSTRING
.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one thing I don't like about this is that when we switch to CMake 3 it is nice to be able to use the VERSION
argument to project()
. I guess we can live without that, though.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @c-andy-martin, @SeanCurtis-TRI, and @sherm1)
CMakeLists.txt, line 291 at r3 (raw file):
# Install catkin package.xml install(FILES package.xml DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/fcl)
"${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}"
This provides the least intrusive, but most automated and correct method for releasing non-catkin packages through the ROS infrastructure. Instead of specifying the FCL version in CMakeModules/FCLVersion.cmake, that module reads the version from package.xml. This provides a single point of maintenance for the version number.
CMakeLists.txt, line 291 at r3 (raw file): Previously, jamiesnape (Jamie Snape) wrote…
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2, 1 of 1 files at r3, 1 of 1 files at r4.
Dismissed @jslee02 from a discussion.
Reviewable status: complete! all files reviewed, all discussions resolved
This provides the least intrusive, but most automated and correct
method for releasing non-catkin packages through the ROS
infrastructure.
These changes allow me to use catkin tools to build fcl, and to
have other catkin packages depend on fcl directly.
This change is