CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY¶
在 3.1 版被加入.
在 3.16 版之後被棄用: Use the CMAKE_FIND_USE_PACKAGE_REGISTRY
variable instead.
By default this variable is not set. If neither
CMAKE_FIND_USE_PACKAGE_REGISTRY
nor
CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
is set, then
find_package()
will use the 使用者軟體包註冊表
unless the NO_CMAKE_PACKAGE_REGISTRY
option is provided.
CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
is ignored if
CMAKE_FIND_USE_PACKAGE_REGISTRY
is set.
In some cases, for example to locate only system wide installations, it
is not desirable to use the 使用者軟體包註冊表 when searching
for packages. If the CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
variable is TRUE
, all the find_package()
commands will skip
the 使用者軟體包註冊表 as if they were called with the
NO_CMAKE_PACKAGE_REGISTRY
argument.
See also 停用軟體包註冊表.