summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-11-05 12:16:51 (GMT)
committerCraig Scott <craig.scott@crascit.com>2019-11-05 12:19:14 (GMT)
commitc831e409a53a33c3b3bdbaa9c19be5ae3364e1f6 (patch)
tree43b36b95f76d1013a8fc5d0adf80f7d16fbf0107 /Source
parente123cfec099ee0c225a49fd698a9802305b86e1c (diff)
parent55df3954d33913727fa7a5871ea1f336b1cbe85c (diff)
downloadCMake-c831e409a53a33c3b3bdbaa9c19be5ae3364e1f6.zip
CMake-c831e409a53a33c3b3bdbaa9c19be5ae3364e1f6.tar.gz
CMake-c831e409a53a33c3b3bdbaa9c19be5ae3364e1f6.tar.bz2
Merge branch 'add_CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY' into release-3.16
Merge-request: !3968
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFindPackageCommand.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index ea936cf..2b11b62 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -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;
}