On 11/18/2010 04:20 PM, Alexander Neundorf wrote:
> The direct call of find_package(ZLIB) from CMakeLists.txt would get the 
> FindZLIB.cmake from CMAKE_MODULE_PATH, since here somebody outside CMAKE_ROOT 
> is the includer.

Okay, that works for the case of dependent find-modules as long as the
project is aware of all the dependencies.  What about fixes to compiler
info files?  We don't want projects to have to make copies of all the
Modules/CMake*Information.cmake files and their dependencies.

> Bill was strictly against that, upgrading cmake must not break any projects.

That's an impossible goal unless the projects strictly use our documented
interface and don't mess with internals at all.  The best we can do is
establish the contract tests so at least we get early warning of some
problems.

> Being able to switch a policy from the command line would make this issue 
> also 
> smaller.

The design of policies and their stack-based scope makes this impossible.
There is no way to know the scope over which the command line setting
applies.  OTOH it can be made possible by project code:

 cmake_policy(PUSH)
 foreach(cmp ${MyProj_POLICIES_NEW})
   cmake_policy(SET ${cmp} NEW)
 endforeach()
 # ... code affected by policy
 cmake_policy(POP)

-Brad
_______________________________________________
cmake-developers mailing list
cmake-developers@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to