[cmake-developers] Automatically set policies for shipped modules

Brad King brad.king at kitware.com
Mon Sep 17 09:07:36 EDT 2018


On 09/17/2018 04:01 AM, Rolf Eike Beer wrote:
> I suggest that every module included from the CMake installation is 
> considered clean for whatever we do and automatically gets a policy 
> scope push/pop right from the C++ level.

That's fine with me for policies like CMP0057 that affect the
CMake language features.  We can't do that for every policy
because some policies affect the way modules behave for the
calling project.

When include() or find_package() establishes the policy scope
for the included module we can inject a few settings.

Thanks,
-Brad


More information about the cmake-developers mailing list