No subject


Wed May 9 12:08:04 EDT 2012


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.zarl at 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
>

--90e6ba6e877a768d4704d11fd2c4
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>The question in this thread is about what previous versions of CMake d=
o with cmake_policy(SET ... OLD) commands where they do not know about the =
policy....</div><div><br></div><div>By default, policies introduced after t=
he minimum required are UNSET, not set to OLD.</div>
<div><br></div><div><br></div>From <a href=3D"http://cmake.org/cmake/help/v=
2.8.10/cmake.html#command:cmake_policy">http://cmake.org/cmake/help/v2.8.10=
/cmake.html#command:cmake_policy</a>:<div><div><br></div><div><p style=3D"c=
olor:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11=
px;line-height:22px;text-align:justify">
All policies introduced after the specified version will be unset (unless v=
ariable CMAKE_POLICY_DEFAULT_CMP&lt;NNNN&gt; sets a default). This effectiv=
ely requests behavior preferred as of a given CMake version and tells newer=
 CMake versions to warn about their new policies. The policy version specif=
ied must be at least 2.4 or the command will report an error. In order to g=
et compatibility features supporting versions earlier than 2.4 see document=
ation of policy CMP0001.<br>
</p><pre style=3D"color:rgb(0,0,0);font-size:11px;line-height:22px;text-ali=
gn:justify">  cmake_policy(SET CMP&lt;NNNN&gt; NEW)<br>  cmake_policy(SET C=
MP&lt;NNNN&gt; OLD)<br></pre><p style=3D"color:rgb(0,0,0);font-family:Verda=
na,Arial,Helvetica,sans-serif;font-size:11px;line-height:22px;text-align:ju=
stify">
Tell CMake to use the OLD or NEW behavior for a given policy. Projects depe=
nding 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.</p>
<p style=3D"color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif=
;font-size:11px;line-height:22px;text-align:justify"><br></p></div></div><d=
iv class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On Tue, Dec 18,=
 2012 at 7:20 AM, Johannes Zarl <span dir=3D"ltr">&lt;<a href=3D"mailto:joh=
annes.zarl at jku.at" target=3D"_blank">johannes.zarl at jku.at</a>&gt;</span> wr=
ote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">Sorry if I add to the confusion, but shouldn=
&#39;t set cmake_minimum_required<br>
automatically set all policies newer than the specified version to old?<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
=A0 Johannes<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
On Monday, 17. December 2012, 17:57:18, Alexander Neundorf wrote:<br>
&gt; On Monday 17 December 2012, David Cole wrote:<br>
&gt; &gt; I thought we wanted them to switch to the new behavior... Isn&#39=
;t that the<br>
&gt; &gt; goal of emitting warnings from policy implementations...?<br>
&gt;<br>
&gt; ...but not as long as the project still wants to keep the old minimum<=
br>
&gt; required cmake version (or am I mixing things up) ?<br>
&gt;<br>
&gt; Alex<br>
</div></div><div class=3D"HOEnZb"><div class=3D"h5">&gt; --<br>
&gt;<br>
&gt; Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.ki=
tware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href=3D"http://www.kitware.com/opensource/opensource.html" target=
=3D"_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the CMake FAQ at:<br>
&gt; <a href=3D"http://www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http=
://www.cmake.org/Wiki/CMake_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"_bla=
nk">http://www.cmake.org/mailman/listinfo/cmake</a><br>
<br>
--<br>
<br>
Powered by <a href=3D"http://www.kitware.com" target=3D"_blank">www.kitware=
.com</a><br>
<br>
Visit other Kitware open-source projects at <a href=3D"http://www.kitware.c=
om/opensource/opensource.html" target=3D"_blank">http://www.kitware.com/ope=
nsource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href=3D"http:/=
/www.cmake.org/Wiki/CMake_FAQ" target=3D"_blank">http://www.cmake.org/Wiki/=
CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"http://www.cmake.org/mailman/listinfo/cmake" target=3D"_blank">h=
ttp://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>

--90e6ba6e877a768d4704d11fd2c4--


More information about the CMake mailing list