The question in this thread is about what previous versions of CMake do
with cmake_policy(SET ... OLD) commands where they do not know about the
policy....

By default, policies introduced after the minimum required are UNSET, not
set to OLD.


>From http://cmake.org/cmake/help/v2.8.10/cmake.html#command:cmake_policy:

All policies introduced after the specified version will be unset (unless
variable CMAKE_POLICY_DEFAULT_CMP<NNNN> sets a default). This effectively
requests behavior preferred as of a given CMake version and tells newer
CMake versions to warn about their new policies. The policy version
specified must be at least 2.4 or the command will report an error. In
order to get compatibility features supporting versions earlier than 2.4
see documentation of policy CMP0001.

  cmake_policy(SET CMP<NNNN> NEW)
  cmake_policy(SET CMP<NNNN> OLD)

Tell CMake to use the OLD or NEW behavior for a given policy. Projects
depending on the old behavior of a given policy may silence a policy
warning by setting the policy state to OLD. Alternatively one may fix the
project to work with the new behavior and set the policy state to NEW.




On Tue, Dec 18, 2012 at 7:20 AM, Johannes Zarl <johannes.z...@jku.at> wrote:

> Sorry if I add to the confusion, but shouldn't set cmake_minimum_required
> automatically set all policies newer than the specified version to old?
>
>   Johannes
>
> On Monday, 17. December 2012, 17:57:18, Alexander Neundorf wrote:
> > On Monday 17 December 2012, David Cole wrote:
> > > I thought we wanted them to switch to the new behavior... Isn't that
> the
> > > goal of emitting warnings from policy implementations...?
> >
> > ...but not as long as the project still wants to keep the old minimum
> > required cmake version (or am I mixing things up) ?
> >
> > Alex
> > --
> >
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
>
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to