[CMake] CMakeModules repository at GitHub?

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Thu Mar 28 20:17:03 EDT 2013


Hello,

On 28/03/13 22:28, David Cole wrote:
> I, too, live in the real world, in addition to having my theories about 
> it... :-)
> 
> And, for what it's worth, I'd rather add a project config file to any 
> project out there that would accept code contributions from me than add 
> yet another find module into CMake.
> 
> Obviously, there will be cases where that is simply not possible for 
> one reason or another. But it's still the preferred mechanism for 
> hooking into CMake's find_package when it is possible.
> 
> And when you have to resort to a find module, it should definitely live 
> in CMake if it's generally useful for more than just your own use...


One of the projects I work on, is currently supporting Debian Squeeze,
and will have to support Debian Wheezy for at least until the next
release (2015?), any software that doesn't have a config file yet, won't
have it probably for the whole lifetime of this release; moreover CMake
will probably stay at version 2.8.9.

So from my point of view, it's nice to have new projects releasing
config files for CMake and/or more FindXXX files in newer versions of
CMake, but even if in the long term is the way to go, it is simply not
useful in my case.
Even though libraries gets the cmake config files, in order to support
older versions of that library, we will still need a Find module.
Moreover, I don't the "imported targets" unless the NAMESPACE option is
used, and I didn't see many packages using it yet.

Also modules often get fixes and tweaks in newer versions of CMake,
sometimes they are still compatible with previous versions and could be
used, sometimes they are not. Referring to [1] every time you have to
check if a version of CMake supports one or has some bug fixed is
sometimes frustrating (especially when the answer is no).

I'd really appreciate an extra repository with find files that are
guaranteed to work on different versions of cmake (i.e. having several
branches, of which one is for CMake 2.8.9 that doesn't use any new
feature from 2.8.10).
If that was some kind of "official" package, I would be even happier.
It would be a lot easier just to update that script package, or just
take the required files and copy them in your project, rather than
require newer version of cmake and/or of external software.


Cheers,
 Daniele

[1]http://www.itk.org/Wiki/CMake_Version_Compatibility_Matrix/StandardCMakeModules




More information about the CMake mailing list