CMP0011.rst 1.2 KB

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