CMP0011.rst 1.1 KB

12345678910111213141516171819202122232425
  1. CMP0011
  2. -------
  3. Included scripts do automatic :command:`cmake_policy` PUSH and POP.
  4. In CMake 2.6.2 and below, CMake Policy settings in scripts loaded by
  5. the :command:`include` and :command:`find_package` commands would affect
  6. the includer. Explicit invocations of ``cmake_policy(PUSH)`` and
  7. ``cmake_policy(POP)`` were required to isolate policy changes and protect
  8. the includer. While some scripts intend to affect the policies of their
  9. includer, most do not. In CMake 2.6.3 and above, :command:`include` and
  10. :command:`find_package` by default ``PUSH`` and ``POP`` an entry on
  11. the policy stack around an included
  12. script, but provide a ``NO_POLICY_SCOPE`` option to disable it. This
  13. policy determines whether or not to imply ``NO_POLICY_SCOPE`` for
  14. compatibility. The ``OLD`` behavior for this policy is to imply
  15. ``NO_POLICY_SCOPE`` for :command:`include` and :command:`find_package` commands.
  16. The ``NEW`` behavior for this policy is to allow the commands to do
  17. their default cmake_policy ``PUSH`` and ``POP``.
  18. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 2.6.3
  19. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  20. .. include:: STANDARD_ADVICE.txt
  21. .. include:: DEPRECATED.txt