summaryrefslogtreecommitdiff
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 1d4a8edd6..171fa77dc 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -507,7 +507,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 {