diff options
author | Brad King <brad.king@kitware.com> | 2019-07-17 11:20:06 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-07-17 11:20:20 (GMT) |
commit | 3f84ff212c2e5ff9410dcd75f7806832472a756d (patch) | |
tree | 237a1aec465fe62ec6ad72d042c1fbb08e934d05 /Source/cmFindPackageCommand.cxx | |
parent | b1199680489b402e3b73229d79eb06e3bd440f81 (diff) | |
parent | f2edccea666662ce93af29e397c50702a675f3f4 (diff) | |
download | CMake-3f84ff212c2e5ff9410dcd75f7806832472a756d.zip CMake-3f84ff212c2e5ff9410dcd75f7806832472a756d.tar.gz CMake-3f84ff212c2e5ff9410dcd75f7806832472a756d.tar.bz2 |
Merge topic 'find_package-fix-NO_MODULE'
f2edccea66 find_package: Fix NO_MODULE under CMAKE_FIND_PACKAGE_PREFER_CONFIG
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3557
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 85546bf..c6d599e 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -823,8 +823,9 @@ bool cmFindPackageCommand::HandlePackageMode( } } - if (this->Makefile->IsOn("CMAKE_FIND_PACKAGE_PREFER_CONFIG") && !found && - handlePackageModeType == HandlePackageModeType::Config) { + if (this->UseFindModules && !found && + handlePackageModeType == HandlePackageModeType::Config && + this->Makefile->IsOn("CMAKE_FIND_PACKAGE_PREFER_CONFIG")) { // Config mode failed. Allow Module case. result = false; } |