Fwd: Re: [cmake-developers] [PATCH] cmCMakePolicyCommand: New PARENT_SCOPE argument

Brad King brad.king at kitware.com
Wed Aug 5 13:11:59 UTC 2015


On 08/04/2015 08:42 AM, Brad King wrote:
> The compatibility model for policies is that the authors of a
> project should be aware of changes to CMake's preferred behavior
> before their project is affected by it.  They indicate so by
> updating their own source to set the policy to NEW.  If your
> dependents want to defer this decision to you and accept the
> risk of the broken compatibility model then they can include
> you with NO_POLICY_SCOPE.  That is our model.

That said, you may still be able to hack this without updating
your dependents by setting CMAKE_POLICY_DEFAULT_CMP0063 to NEW:

 http://www.cmake.org/cmake/help/v3.3/variable/CMAKE_POLICY_DEFAULT_CMPNNNN.html

The variable is meant for end users to set in their local cache
to quiet policy warnings without modifying the project.  The
variable documents that it should not be set by project code,
but you could abuse it for your use case.  Setting it won't
override policy settings made by your dependents but can set
the default when they don't set the policy at all.  This still
breaks our compatibility model, but it is an option you have.

-Brad



More information about the Kde-buildsystem mailing list