Haibo Huang | d00577c | 2020-02-28 16:35:48 -0800 | [diff] [blame] | 1 | CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY |
| 2 | -------------------------------------- |
| 3 | |
| 4 | .. deprecated:: 3.16 |
| 5 | |
| 6 | Use the :variable:`CMAKE_FIND_USE_PACKAGE_REGISTRY` variable instead. |
| 7 | |
| 8 | By 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` |
| 12 | unless 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 | |
| 17 | In some cases, for example to locate only system wide installations, it |
| 18 | is not desirable to use the :ref:`User Package Registry` when searching |
| 19 | for packages. If the :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` |
| 20 | variable is ``TRUE``, all the :command:`find_package` commands will skip |
| 21 | the :ref:`User Package Registry` as if they were called with the |
| 22 | ``NO_CMAKE_PACKAGE_REGISTRY`` argument. |
| 23 | |
| 24 | See also :ref:`Disabling the Package Registry`. |