CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY.rst 1.0 KB

1234567891011121314151617181920212223242526
  1. CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
  2. --------------------------------------
  3. .. versionadded:: 3.1
  4. .. deprecated:: 3.16
  5. Use the :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` variable instead.
  6. By default this variable is not set. If neither
  7. :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` nor
  8. ``CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`` is set, then
  9. :command:`find_package()` will use the :ref:`User Package Registry`
  10. unless the ``NO_CMAKE_PACKAGE_REGISTRY`` option is provided.
  11. ``CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`` is ignored if
  12. :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` is set.
  13. In some cases, for example to locate only system wide installations, it
  14. is not desirable to use the :ref:`User Package Registry` when searching
  15. for packages. If the ``CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY``
  16. variable is ``TRUE``, all the :command:`find_package` commands will skip
  17. the :ref:`User Package Registry` as if they were called with the
  18. ``NO_CMAKE_PACKAGE_REGISTRY`` argument.
  19. See also :ref:`Disabling the Package Registry`.