summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 1ff093f..51137b3 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -576,6 +576,11 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
loadedPackage = true;
}
}
+
+ if (this->DebugMode) {
+ this->DebugMessage(this->DebugBuffer);
+ this->DebugBuffer.clear();
+ }
}
this->AppendSuccessInformation();
@@ -788,6 +793,17 @@ bool cmFindPackageCommand::FindModule(bool& found)
this->Makefile->AddDefinition(var, "1");
bool result = this->ReadListFile(mfile, DoPolicyScope);
this->Makefile->RemoveDefinition(var);
+
+ if (this->DebugMode) {
+ std::string foundVar = cmStrCat(this->Name, "_FOUND");
+ if (this->Makefile->IsDefinitionSet(foundVar) &&
+ !this->Makefile->IsOn(foundVar)) {
+
+ this->DebugBuffer = cmStrCat(
+ this->DebugBuffer, "The module is considered not found due to ",
+ foundVar, " being FALSE.");
+ }
+ }
return result;
}
return true;