Hi all,
Inspired by the recent posts made by Sylvain and Stephen,
I'd feel much better if each external dependency would have its own Find*.cmake script instead of the generic overly complex check_* script.
Finally, there is more complete (and tested) scripts for dependencies like boost, maybe we should use it.
I'd like to further discuss the subject, and poll for opinions. I believe that for us, correctly finding the external dependencies is one of the more painful parts of the build, especially because we have some of the dependencies in nonstandard locations. So here go the comments:
- Each external dependency should have its own FindXXX module (modularity!), and whenever possible, existing modules should be used. The Cmake guys already support (and maintain!) a large number of packages, and many more can be found elsewhere in the sources of other projects. The FindBoost script is a great example of this: it is actively maintained, and has been recently endowed with very nice functionalities (minimum required version, required components, use static, use multithreading...). OTOH, the Orocos script is quite simple, and is not the same in RTT and KDL!.
- When writing our own FindXXX.cmake scripts, what would be your preferred policy for finding headers/libs/programs?
- Search in user-defined paths, then system paths e.g., using the HINTS keyword (Cmake >=2.6.1)
- Search ONLY user-defined paths e.g., using PATHS + NO_DEFAULT_PATH
- A third way?
We currently use a variable called XXX_USE (a la Boost_USE) to specify a path prefix that can be used with any of the above policies.
- Could it be possible to require a minimum CMake version higher than 2.2?, or such backwards compatibility is crucial for the Orocos project?. Many great functionalities have been added to CMake since the 2.2 era, in particular in the 2.6x releases. For example, the DEPENDENT_OPTION custom macro is already supported as CMAKE_DEPENDENT_OPTION, and the FindPkgConfig pkg-config module looks pretty complete.
If there's interest, I'm offering to help in these areas, but first of all I would like to know what are your thoughts on the matter, what would be good to improve, what are the missing features, and what are the already implemented features that are better than other existing alternatives (and thus should be preserved!).
Looking forward to read your comments (developpers and users)
Best,
Adolfo Rodríguez Tsouroukdissian
Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
CMake and finding external dependencies (from Omniorb merge vs O
<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<blockquote type="cite">Hi all,
Inspired by the recent posts made by Sylvain and Stephen,
I'd feel much better if each external dependency would have its own Find*.cmake script instead of the generic overly complex check_* script.
Finally, there is more complete (and tested) scripts for dependencies like boost, maybe we should use it.
I'd like to further discuss the subject, and poll for opinions. I believe that for us, correctly finding the external dependencies is one of the more painful parts of the build, especially because we have some of the dependencies in nonstandard locations. So here go the comments:<blockquote>
It's also the interconnected nature of the dependancies, within check_depend and global_setup, that makes life difficult. That's something we as Orocos users/developers have to deal with. The FindXXX modules will only clean up some of this complexity, not all.
<blockquote type="cite">- Each external dependency should have its own FindXXX module (modularity!), and whenever possible, existing modules should be used. The Cmake guys already support (and maintain!) a large number of packages, and many more can be found elsewhere in the sources of other projects. The FindBoost script is a great example of this: it is actively maintained, and has been recently endowed with very nice functionalities (minimum required version, required components, use static, use multithreading...). OTOH, the Orocos script is quite simple, and is not the same in RTT and KDL!.
- When writing our own FindXXX.cmake scripts, what would be your preferred policy for finding headers/libs/programs?
- Search in user-defined paths, then system paths e.g., using the HINTS keyword (Cmake >=2.6.1)<blockquote>
Possibly I would argue for this, in the CMake recommended fashion
<blockquote type="cite"> - Search ONLY user-defined paths e.g., using PATHS + NO_DEFAULT_PATH<blockquote>
I disagree with this one. Default OS installs will only have things in system paths. We must use those for searching.
We currently use a variable called XXX_USE (a la Boost_USE) to specify a path prefix that can be used with any of the above policies.
- Could it be possible to require a minimum CMake version higher than 2.2?, or such backwards compatibility is crucial for the Orocos project?. Many great functionalities have been added to CMake since the 2.2 era, in particular in the 2.6x releases. For example, the DEPENDENT_OPTION custom macro is already supported as CMAKE_DEPENDENT_OPTION, and the FindPkgConfig pkg-config module looks pretty complete.
If there's interest, I'm offering to help in these areas, but first of all I would like to know what are your thoughts on the matter, what would be good to improve, what are the missing features, and what are the already implemented features that are better than other existing alternatives (and thus should be preserved!).
Looking forward to read your comments (developpers and users)<blockquote>
Ditto.
<body><html>