[cmake-developers] [PATCH] cmCMakePolicyCommand: New PARENT_SCOPE argument
Brad King
brad.king at kitware.com
Thu Jul 30 09:28:12 EDT 2015
On 07/29/2015 03:58 PM, Alex Merry wrote:
> This is intended to be used from a "settings file" which is applied to a
> group of CMake projects. This allows the file to control which policies
> means that users of the settings file are not forced to use NO_POLICY_SCOPE
> (particularly important if the settings file did not originally have any
> policy settings in it, but later acquired some).
Policies should not be set from a central hub, especially without the
explicit permission of the including project (via NO_POLICY_SCOPE).
Setting policies centrally breaks their compatibility model. The
whole point is that the old behavior is preserved (possibly with a
warning) until the project whose code triggers the policy is modified
to address it. By setting a policy on behalf of the project calling
include() you could silence warnings about behavior changes or even
introduce errors. Each project author needs a chance to see their
own policy warnings and address them accordingly.
-Brad
More information about the cmake-developers
mailing list