[cmake-developers] CMP0043 warnings everywhere
Alexander Neundorf
neundorf at kde.org
Tue Apr 29 16:21:06 EDT 2014
On Monday, April 28, 2014 10:26:56 James Bigler wrote:
> > -----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.
if(POLICY CMP0043)
cmake_policy(SET CMP0043 OLD)
endif()
you might wrap that into a macro, so you just hand in the list of (new)
policies.
Alex
More information about the cmake-developers
mailing list