[cmake-developers] CMP0043 warnings everywhere

James Bigler jbigler at nvidia.com
Mon Apr 28 13:26:56 EDT 2014


> -----Original Message-----
> From: cmake-developers [mailto:cmake-developers-bounces at cmake.org] On
> Behalf Of Brad King
> Sent: Wednesday, April 23, 2014 11:06 AM
> To: cmake-developers at cmake.org
> Subject: Re: [cmake-developers] CMP0043 warnings everywhere
> 
> On 04/23/2014 12:57 PM, James Bigler wrote:
> > I'm getting tons of CMP0043 warnings on my existing project.
> >
> > I have cmake_policy(VERSION 2.6) set in my project.
> > Why am I being pestered by warnings?  Shouldn't I get a policy value
> > appropriate for 2.6 (so CMP0043 should be set to OLD)?
> 
> Setting policies by VERSION leaves policies newer than that version unset, not
> set to OLD.  If it were to set them to OLD then no new policies would ever warn.
> There is intentionally no way to turn off warnings about policies newer than
> those known to the project code, except by using -Wno-dev locally.
> Otherwise developers would never see the warnings and know to update their
> code.

I thought the purpose of policies was to keep some backward compatibility feature, but allow users to select the new behavior.  In this case, setting the behavior for new policies to OLD seems the most logical, especially when I asked for it with cmake_policy(VERSION).  Now I'm forced to set this policy to OLD in order to not have a million warnings spam my team.  This seems like a non-backward compatible decision.

Is there a way to not have all these "developer" warnings on by default?  I'm not sure how CMake distinguishes between who is a developer and who isn't.

-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------



More information about the cmake-developers mailing list