[CMake] open source project for CMake ports?

Alexander Neundorf a.neundorf-work at gmx.net
Thu Feb 19 15:38:39 EST 2009


On Wednesday 18 February 2009, Philip Lowman wrote:
> On Tue, Feb 17, 2009 at 4:19 PM, Eric Noulard <eric.noulard at gmail.com>wrote:
...
> > if FORCE_UPDATE is YES/TRUE then the module would be updated everytime
> > cmake is run.
> > The default would be not to update if the file is already there locally.
> >
> > So then CMake may indicates a list of base url where "unsupported"
> > scripts may be found
> >
> > cmake --help-unsupported-modules

You can right now do 
cmake -DCMAKE_MODULE_PATH=/my/local/cmake/modules --help-custom-modules
(works only for local dirs though)

> This is an interesting idea.
>
> One thought I had was the potential of new features creeping into the CMake
> module you're downloading that aren't yet available in the CMake version
> that you're using.  One example of this as of late is the HINTS feature.
> There are still many people out there using CMake 2.4.x and plenty of Find
> Modules which now support HINTS (which obviously doesn't work in 2.4.x).
>
> My point is by pointing your source tree off to some URL you immediately
> assume that the module located there will ALWAYS work with the current
> trunk of your software (from now until the end of time) when this may not
> necessarily be the case.

I agree with that. 
And once you have found out that a cmake module you need exists somewhere, you 
can also bundle it with your software. Then you also know what you have and 
can fix it if something breaks.

Beside that, at least starting with cmake 2.6.3 it should be recommended to 
put a cmake_minimum_required(VERSION ... ) in such cmake modules, so they 
will fail with an appropriate error if it's not good enough.
(with cmake 2.6.0 to 2.6.2 there is an issue with this: if you do this in a 
cmake module, it also sets the cmake policies to this version, and these 
policies are then applied to the including file. With 2.6.3 by default the 
different policies don't "escape" that file) (hope I got that right).

Alex


More information about the CMake mailing list