summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 1fbb97b..8f74ba8 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -729,8 +729,9 @@ bool cmFindPackageCommand::HandlePackageMode()
// package not found
if (result && !found) {
- // warn if package required and not quiet
- if (!this->Quiet || this->Required) {
+ // warn if package required or neither quiet nor in config mode
+ if (this->Required ||
+ !(this->Quiet || (this->UseConfigFiles && !this->UseFindModules))) {
// The variable is not set.
std::ostringstream e;
std::ostringstream aw;
@@ -832,6 +833,13 @@ bool cmFindPackageCommand::HandlePackageMode()
this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, aw.str());
}
}
+ // output result if in config mode but not in quiet mode
+ else if (!this->Quiet) {
+ std::ostringstream aw;
+ aw << "Could NOT find " << this->Name << " (missing: " << this->Name
+ << "_DIR)";
+ this->Makefile->DisplayStatus(aw.str().c_str(), -1);
+ }
}
// Set a variable marking whether the package was found.