CMP0074.rst 927 B

12345678910111213141516171819202122
  1. CMP0074
  2. -------
  3. :command:`find_package` uses ``PackageName_ROOT`` variables.
  4. In CMake 3.12 and above the ``find_package(PackageName)`` command now searches
  5. a prefix specified by a ``PackageName_ROOT`` CMake or environment variable.
  6. Package roots are maintained as a stack so nested calls to all ``find_*``
  7. commands inside find modules also search the roots as prefixes. This policy
  8. provides compatibility with projects that have not been updated to avoid using
  9. ``PackageName_ROOT`` variables for other purposes.
  10. The ``OLD`` behavior for this policy is to ignore ``PackageName_ROOT``
  11. variables. The ``NEW`` behavior for this policy is to use ``PackageName_ROOT``
  12. variables.
  13. This policy was introduced in CMake version 3.12. CMake version
  14. |release| warns when the policy is not set and uses ``OLD`` behavior.
  15. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
  16. explicitly.
  17. .. include:: DEPRECATED.txt