[cmake-developers] A policy for Policies
Brad King
brad.king at kitware.com
Thu Jun 18 09:28:37 EDT 2015
On 06/11/2015 02:20 PM, Stephen Kelly wrote:
> So, KDE4 as a platform breaks the cmake compatibility design for its
> downstreams. At least ECM, used by KDE Frameworks 5, doesn't do that.
That is unfortunate :(
> I still think they should be unconditional warnings.
Yes, see below.
> I also think we should make them REQUIRED_* eventually, but I expect
> you now never will.
Either way we clearly need to do a better job at convincing projects to
port away from OLD behaviors. One idea is that if a project does
cmake_minimum_required(VERSION X.Y) # or cmake_policy(VERSION X.Y)
then we can make it an error to set to OLD any policy introduced in
version X.Y or earlier. (For pre-3.4 policies this may have to be an
unconditional warning instead.) Then N(=6?) releases later we make
it an unconditional warning regardless of cmake_minimum_required.
We could also make setting a policy to OLD a deprecation warning
for use with CMAKE_ERROR_DEPRECATED and CMAKE_WARN_DEPRECATED.
We should also have a way to optionally turn policy-no-set
warnings into errors to make them easy to find even in scripts
whose output no one ever reads.
Thanks,
-Brad
More information about the cmake-developers
mailing list