blob: 4ee9d8b81536bdcc293befbdeaed11717d70c31c [file] [log] [blame]
Haibo Huangd00577c2020-02-28 16:35:48 -08001CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
2--------------------------------------
3
4.. deprecated:: 3.16
5
6 Use the :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` variable instead.
7
8By default this variable is not set. If neither
9:variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` nor
10``CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`` is set, then
11:command:`find_package()` will use the :ref:`User Package Registry`
12unless the ``NO_CMAKE_PACKAGE_REGISTRY`` option is provided.
13
14``CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`` is ignored if
15:variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` is set.
16
17In some cases, for example to locate only system wide installations, it
18is not desirable to use the :ref:`User Package Registry` when searching
19for packages. If the :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY`
20variable is ``TRUE``, all the :command:`find_package` commands will skip
21the :ref:`User Package Registry` as if they were called with the
22``NO_CMAKE_PACKAGE_REGISTRY`` argument.
23
24See also :ref:`Disabling the Package Registry`.