[CMake] Adding Cmake version in online documentation

Ruslan Baratov ruslan_baratov at yahoo.com
Wed Nov 9 09:52:52 EST 2016


Can you show the real code? The code that in your opinion doesn't
violate the "right way of policy usage"?

On 09-Nov-16 22:14, Nils Gladitz wrote:
> On 09.11.2016 14:57, Ruslan Baratov wrote:
>>
>> Again policies are not meant to be feature toggles.
>> You can do a lot of things and there may be valid use cases but in
>> general policies are not meant to be used this way.
>> This is made explicit in CMake's documentation on policies.
>> They exist to preserve backwards compatibility not to pick and choose
>> behaviours.
>>
>> So can you show an example of "valid" use of `cmake_policy` command?
>>
>
> To quote the documentation:
> "A policy is a deprecation mechanism and not a reliable feature
> toggle. A policy should almost never be set to |OLD|, except to
> silence warnings in an otherwise frozen or stable codebase, or
> temporarily as part of a larger migration path."
>
> Beyond that valid use would be e.g. cmake's own testsuite which needs
> to be able to toggle individual policies to verify their behaviour.
>
> Nils
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161109/712658ab/attachment.html>


More information about the CMake mailing list