[cmake-developers] CMP0043 warnings everywhere

Brad King brad.king at kitware.com
Mon Apr 28 13:39:09 EDT 2014


On 04/28/2014 01:26 PM, James Bigler wrote:
> I thought the purpose of policies was to keep some backward compatibility
> feature, but allow users to select the new behavior.

The purpose is to change CMake interfaces or behavior while still
building existing project releases that have not been updated by
their developers to understand the new behavior:

 http://www.cmake.org/Wiki/CMake/Policies

> Now I'm forced to set this policy to OLD in order to not have a million
> warnings spam my team.

Or, you could fix your project to not use the behavior deprecated
by the policy.  The documentation of CMP0043 includes an example:

 http://www.cmake.org/cmake/help/v3.0/policy/CMP0043.html

The only reason to ever set a policy to OLD explicitly is as a
patch to a release maintenance branch where you want to quiet
the warning but not make other changes to the project.  A policy
should not be set to OLD in the development branches.

> This seems like a non-backward compatible decision.

It issues warnings but it does not change build behavior by default.

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

It assumes everyone is a developer of the project unless they specify
-Wno-dev.  The purpose of the option is for users to quiet the warnings
when just building the project for local installation but not to
develop it.

-Brad




More information about the cmake-developers mailing list