[cmake-developers] A policy for Policies

Domen Vrankar domen.vrankar at gmail.com
Wed Jun 10 15:52:57 EDT 2015


>> And do we really still need version 2.6 as default (we could bump this
>> version to where current policies are still treated as warnings not
>> errors)?
>
> To which default do you refer?  Where in our code is it set?
> Likely we cannot update it because it could change behavior
> of existing scripts with no transition warning ever given.

I've read it in Mastering CMake and had to search for it today...  On
page 42 it says that by default if cmake_minimu_required is missing it
sets policy version of 2.4.

It's probably a technical back compatibility reason
(cmake_minimum_required wasn't present back then?) and those scripts
don't necessarily use any of the policies that will change but I was
wondering if changing this to a newer version (2.6.8?) would be
appropriate now that older policies will no longer support current OLD
setting.

Since the main reason I proposed that was fall back of CMake scripts
that are missing cmake_minimu_required I guess that printing out a
warning for scripts as well would also be fine.

Regards,
Domen


More information about the cmake-developers mailing list