Skip to content
  • Brad King's avatar
    Do not warn by default when policy CMP0025 or CMP0047 is not set · a41c0a9d
    Brad King authored
    These policies are triggered by the use of a particular compiler rather
    than outdated CMake code in a project.  Avoid warning in every project
    that enables a language by not displaying the policy warning by default.
    Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning
    explicitly; otherwise enable the warning with --debug-output or --trace.
    
    This breaks with strict policy convention because it does not provide
    developers with any warning about the behavior change by default.
    Existing projects will continue to build without a warning or change in
    behavior.  When a developer changes the minimum required version of
    CMake in a project to a sufficiently high value (3.0), the project will
    suddenly get the new compiler id and may break, but at least the
    breakage comes with a change to the project rather than the version of
    CMake used to build it.
    
    Breaking strict policy convention is worthwhile in this case because
    very few projects will be affected by the behavior change but every
    project would have to see the warning if it were enabled by default.
    a41c0a9d