[CMake] How to use CMAKE_POLICY?
Marcel Loose
marcel.loose at zonnet.nl
Wed Dec 19 08:55:23 EST 2012
Op 18-12-12 13:46, David Cole schreef:
> On Mon, Dec 17, 2012 at 11:57 AM, Alexander Neundorf
> <a.neundorf-work at gmx.net <mailto:a.neundorf-work at gmx.net>> 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
>
>
>
> No, you're not mixing things up. You're correct.
>
> If somebody wants to use minimum required 2.6.2 *and* they don't like
> warnings emitted by newer versions of CMake about new policies, then
> they have to change their code, or use the -D
> CMAKE_POLICY_DEFAULT_CMP<NNNN> technique.
>
> Now if they're going to change their code anyway, why not make a
> change that is compatible with the new policy introduced rather than
> adding a bunch of code to keep things in the OLD state. With many
> policies it is possible to write CMake code that honors the NEW state
> of the policy, but still works with older CMakes.
>
> I would ask for specific advice regarding the particulars of the
> policy violation to see if there is such a way to re-write the code to
> work with older AND newer CMakes before I would ever consider setting
> a policy to OLD in my own CMakeLists files.
>
>
> HTH,
> David
>
>
I can send specific examples if you want. I'm not sure I can send
attachments to the mailing list, though.
Regards,
Marcel Loose.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20121219/4807abc3/attachment.htm>
More information about the CMake
mailing list