ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

CMake itself does support specifying versions of packages (see cmake.html#find_package), but only if the FindX.cmake script implements it. AFAIK many of the find scripts provided with the binary CMake distribution do.

Catkin does not seem to expose this in its catkin_package(..) macro AFAICT. Normal invocations of find_package(..) in your CMakeLists.txt could make use of the described version argument.

As for detecting support for features vs relying on version numbers: that approach would seem superiour, and is the one that's been advocated by the javascript / browser-based application developer community for a long time now. Plain CMake may be able to help you with this, see cmake.html#CheckFunctionExists.

CMake itself does support specifying versions of packages (see cmake.html#find_package), but only if the FindX.cmake script implements it. AFAIK many of the find scripts provided with the binary CMake distribution do.

Catkin does not seem to (currently) expose this in its catkin_package(..) macro AFAICT. AFAICT (see groovy-devel/cmake/catkin_package.cmake). Normal invocations of find_package(..) in your CMakeLists.txt could make use of the described version argument.

As for detecting support for features vs relying on version numbers: that approach would seem superiour, and is the one that's been advocated by the javascript / browser-based application developer community for a long time now. Plain CMake may be able to help you with this, see cmake.html#CheckFunctionExists.

CMake itself does support specifying versions of packages (see cmake.html#find_package), but only if the FindX.cmake script implements it. AFAIK many of the find scripts provided with the binary CMake distribution do.

I may be wrong, but Catkin does not seem to (currently) expose this in its catkin_package(..) macro AFAICT (see groovy-devel/cmake/catkin_package.cmake). Normal invocations of find_package(..)There is some version checking going on in groovy-devel/cmake/catkin_package.cmake in your CMakeLists.txt could make use of around line 188, but I can't tell from the described version argument.source how that should work.

As for detecting support for features vs relying on version numbers: that approach would seem superiour, and is the one that's been advocated by the javascript / browser-based application developer community for a long time now. Plain CMake may be able to help you with this, see cmake.html#CheckFunctionExists.

CMake itself does support specifying versions of packages (see cmake.html#find_package), but only if the FindX.cmake script implements it. AFAIK many of the find scripts provided with the binary CMake distribution do.

I may be wrong, but Catkin does not seem to (currently) expose this in its catkin_package(..) macro AFAICT (see groovy-devel/cmake/catkin_package.cmake). There is some version checking going on in groovy-devel/cmake/catkin_package.cmake around line 188, but I can't tell from the source how that should work.

As for detecting support for features vs relying on version numbers: that approach would seem superiour, and is the one that's been advocated by the javascript / browser-based application developer community for a long time now. Plain CMake may be able to help you with this, see cmake.html#CheckFunctionExists.


Edit: according to REP-127, it is possible to specificy versioned dependencies (from the example in that REP):

<build_depend version_gte="1.1" version_lt="2.0">genmsg</build_depend>

I assume this information is then passed to the version checking in groovy-devel/cmake/catkin_package.cmake.

CMake itself does support specifying versions of packages (see cmake.html#find_package), but only if the FindX.cmake script implements it. AFAIK many of the find scripts provided with the binary CMake distribution do.

I may be wrong, but Catkin does not seem to (currently) expose this in its catkin_package(..) macro AFAICT (see groovy-devel/cmake/catkin_package.cmake). There is some version checking going on in groovy-devel/cmake/catkin_package.cmake around line 188, but I can't tell from the source how that should work. See edit.

As for detecting support for features vs relying on version numbers: that approach would seem superiour, and is the one that's been advocated by the javascript / browser-based application developer community for a long time now. Plain CMake may be able to help you with this, see cmake.html#CheckFunctionExists.


Edit: according to REP-127, it is possible to specificy versioned dependencies (from the example in that REP):

<build_depend version_gte="1.1" version_lt="2.0">genmsg</build_depend>

I assume this information is then passed to the version checking in groovy-devel/cmake/catkin_package.cmake.