[cmake-developers] User vs CMake include mismatch handling

Alexander Neundorf neundorf at kde.org
Fri Oct 8 12:57:44 EDT 2010

On Friday 08 October 2010, you wrote:
> On Fri, Oct 8, 2010 at 10:59 AM, Alexander Neundorf <neundorf at kde.org>wrote:
> > Better idea:
> >
> > I'll add a policy which switches this behaviour (prefer CMAKE_ROOT over
> > CMAKE_MODULE_PATH when used from within CMAKE_ROOT), and this policy
> > will, as
> > all other policies, default to the old behaviour, but warn.
> This latest idea does sound better, but I am still not a fan of "invisible
> / magic behavior." I much prefer when things are explicitly spelled out.

Another idea would be the following behaviour (also with a policy):
if a file, which has been found via CMAKE_MODULE_PATH or CMAKE_ROOT, includes 
another files, it looks first in its own directory, then in 

This would result in the same new behaviour for files in CMAKE_ROOT, 
additionally it would also change the search order for files found via 
CMAKE_MODULE_PATH. So this would be a bigger, but maybe more consistent 
change from the current behaviour.


More information about the cmake-developers mailing list