summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 7bcb719..a8dff95 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -237,7 +237,6 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
// Process debug mode
this->DebugMode = this->ComputeIfDebugModeWanted() ||
this->Makefile->GetCMakeInstance()->GetDebugFindPkgOutput(this->Name);
- this->DebugBuffer.clear();
// Parse the arguments.
enum Doing
@@ -610,15 +609,14 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
loadedPackage = true;
}
}
-
- if (this->DebugMode) {
- this->DebugMessage(this->DebugBuffer);
- this->DebugBuffer.clear();
- }
}
this->AppendSuccessInformation();
+ if (!this->DebugBuffer.empty()) {
+ this->DebugMessage(this->DebugBuffer);
+ }
+
return loadedPackage;
}
@@ -947,11 +945,6 @@ bool cmFindPackageCommand::HandlePackageMode(
result = false;
}
- if (this->DebugMode) {
- this->DebugMessage(this->DebugBuffer);
- this->DebugBuffer.clear();
- }
-
// package not found
if (result && !found) {
// warn if package required or neither quiet nor in config mode