<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09.11.2016 14:57, Ruslan Baratov
wrote:<br>
</div>
<blockquote
cite="mid:3c46458b-e1bf-6914-acd2-0a9acb63d9ba@gmail.com"
type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<br>
Again policies are not meant to be feature toggles.<br>
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.<br>
This is made explicit in CMake's documentation on policies.<br>
They exist to preserve backwards compatibility not to pick and
choose behaviours. <br>
<br>
</blockquote>
<blockquote
cite="mid:0a0ffaba-3b9d-fcf2-af0d-4cce42bf8184@yahoo.com"
type="cite"> <tt>So can you show an example of "valid" use of
`cmake_policy` command?<br>
</tt><br>
</blockquote>
<br>
To quote the documentation:<br>
"A policy is a deprecation mechanism and not a reliable feature
toggle.
A policy should almost never be set to <code class="docutils
literal"><span class="pre">OLD</span></code>, except to silence
warnings
in an otherwise frozen or stable codebase, or temporarily as part of
a
larger migration path."<br>
<br>
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.<br>
<p>Nils<br>
</p>
</body>
</html>