[cmake-developers] CMP0043 warnings everywhere

Brad King brad.king at kitware.com
Tue Apr 29 16:38:56 EDT 2014


On 04/29/2014 04:25 PM, Alexander Neundorf wrote:
>> Or, you could fix your project to not use the behavior deprecated
>> by the policy.  
> 
> Other reasons are e.g. avoiding to annoy your developer team by warnings which 
> don't matter (the build has been working, so there's no need to change it).

Yes, there is a need to change it.  CMake deprecated an interface.
The project should stop using it and use the replacement interface
instead.  The CMP0043 documentation explains how and gives examples.

> Or, correct me if I'm wrong, isn't it possible that by fixing a warning the 
> project then requires the cmake version which added the warning ?
> Which would mean fixing the warning would break the build with the (old) 
> required cmake version ?

Almost all policies that deprecate old interfaces are added only after
an overlap period with versions of CMake that have the new interfaces
but do not warn about use of the old.  This allows projects to use the
new interfaces to avoid the warning while still working with CMake
versions older than the one that introduced the policy.

In this case the project need only require CMake 2.8.10 (which has been
out for 18 months) and use generator expressions in the non-config
COMPILE_DEFINITIONS.

-Brad




More information about the cmake-developers mailing list