POLICY_VERSION.rst 906 B

12345678910111213141516
  1. This specifies that the current CMake code is written for the given range of
  2. CMake versions, ``<min>[...<max>]``. It sets the "policy version" to:
  3. * the range's ``<max>`` version, if specified, or to
  4. * the ``<min>`` version, or to
  5. * the value of the :variable:`CMAKE_POLICY_VERSION_MINIMUM` variable
  6. if it is higher than the other two versions.
  7. The policy version effectively requests behavior preferred as of a given CMake
  8. version and tells newer CMake versions to warn about their new policies.
  9. All policies known to the running version of CMake and introduced
  10. in that version or earlier will be set to use ``NEW`` behavior.
  11. All policies introduced in later versions will be unset (unless the
  12. :variable:`CMAKE_POLICY_DEFAULT_CMP<NNNN>` variable sets a default).
  13. This effectively requests behavior preferred as of a given CMake
  14. version and tells newer CMake versions to warn about their new policies.