summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-08-07 13:57:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-08-07 13:57:35 (GMT)
commitce14f6c67724fccc25547db62e645ab8d115841c (patch)
tree85ab70a5fc02d6cdfe6f7f471e8d11492702395c /Source
parente295290ed707a78a0ba6c66cbd1bbf069b5d582c (diff)
parent8ed868606ddae005b4a50319bdc291b8df5b525a (diff)
downloadCMake-ce14f6c67724fccc25547db62e645ab8d115841c.zip
CMake-ce14f6c67724fccc25547db62e645ab8d115841c.tar.gz
CMake-ce14f6c67724fccc25547db62e645ab8d115841c.tar.bz2
Merge topic 'find_package-prefer-config-not-found'
8ed868606d find_package: Fix prefer-config mode to not fail on missing optional package Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3653
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFindPackageCommand.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 04fbbad..0159ca5 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -517,7 +517,9 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args,
loadedPackage = true;
} else {
// The package was not loaded. Report errors.
- HandlePackageMode(HandlePackageModeType::Module);
+ if (HandlePackageMode(HandlePackageModeType::Module)) {
+ loadedPackage = true;
+ }
}
}
} else {