mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-19 21:50:39 -06:00
Merge branch 'add_CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY' into release-3.16
Merge-request: !3968
This commit is contained in:
@@ -201,7 +201,13 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
|
||||
}
|
||||
|
||||
// Check if System Package Registry should be disabled
|
||||
if (this->Makefile->IsOn("CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY")) {
|
||||
// The `CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY` has
|
||||
// priority over the deprecated CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
|
||||
if (const char* def = this->Makefile->GetDefinition(
|
||||
"CMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY")) {
|
||||
this->NoSystemRegistry = !cmIsOn(def);
|
||||
} else if (this->Makefile->IsOn(
|
||||
"CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY")) {
|
||||
this->NoSystemRegistry = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user