CMP0074.rst 999 B

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