Help: Add introduction section to cmake-policies manual

Explain the concept behind policies.
This commit is contained in:
Stephen Kelly 2013-10-18 19:22:09 +02:00 committed by Brad King
parent 919e1e8453
commit 6d50d0197a
1 changed files with 20 additions and 0 deletions

View File

@ -5,6 +5,26 @@ cmake-policies(7)
.. contents:: .. contents::
Introduction
============
Policies in CMake are used to preserve backward compatible behavior
across multiple releases. When a new policy is introduced, newer CMake
versions will begin to warn about the backward compatible behavior. It
is possible to disable the warning by explicitly requesting the OLD, or
backward compatible behavior using the :command:`cmake_policy` command.
It is also possible to request NEW, or non-backward compatible behavior
for a policy, also avoiding the warning.
The :command:`cmake_minimum_required` command does more than report an
error if a too-old version of CMake is used to build a project. It
also sets all policies introduced in that CMake version or earlier to
NEW behavior.
The :variable:`CMAKE_MINIMUM_REQUIRED_VERSION` variable may also be used
to determine whether to report an error on use of deprecated macros or
functions.
All Policies All Policies
============ ============