On Monday, April 28, 2014 10:26:56 James Bigler wrote:
> > -----Original Message-----
> > From: cmake-developers [mailto:[email protected]] On
> > Behalf Of Brad King
> > Sent: Wednesday, April 23, 2014 11:06 AM
> > To: [email protected]
> > 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

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to