[CMake] open source project for CMake ports?
a.neundorf-work at gmx.net
Fri Feb 20 12:58:48 EST 2009
On Friday 20 February 2009, Philip Lowman wrote:
> On Thu, Feb 19, 2009 at 3:38 PM, Alexander Neundorf
> <a.neundorf-work at gmx.net
> > wrote:
> > On Wednesday 18 February 2009, Philip Lowman wrote:
> > > 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).
> Thanks for sharing that. I always wondered what might happen if I set
> cmake_minimum_required() in a module. I figured it would be global so
Well, it is global in so far that if cmake is older than the version specified
there, then cmake will abort for the whole project.
The policies set automatically by calling cmake_minimum_required() have
kind-of directory-scope with 2.6.[0-2], with 2.6.3 they will by default only
apply to that file.
More information about the CMake