[cmake-developers] A policy for Policies
Stephen Kelly
steveire at gmail.com
Sat Jun 6 10:20:59 EDT 2015
Stephen Kelly wrote:
> Setting a policy to REQUIRED_IF_USED in the cmake source means that if
> someone tries
>
> cmake_policy(SET CMP0011 OLD)
>
> they will get an informative error instead of no warning.
Actually, that's not correct, sorry I wrote the explanation too quickly.
What I described is actually REQUIRED_ALWAYS.
REQUIRED_IF_USED means that if the policy behavior is hit (ie, relying on
old CMP0011 behavior), *and* the code has
cmake_policy(SET CMP0011 OLD)
*then* they get an informative error.
If they set the policy (with cmake_policy or with cmake_minimum_required),
but already don't rely on OLD behavior, then there is no new error.
Thanks,
Steve.
More information about the cmake-developers
mailing list