summaryrefslogtreecommitdiff
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-10 12:17:39 -0500
committerBrad King <brad.king@kitware.com>2022-02-10 15:25:05 -0500
commita690523fcf31ca7dc062fca746c0f76e405c0e7a (patch)
tree738daee0f71987ba12b8bea30f02e0cbca6be997 /Source/cmFindPackageCommand.cxx
parent0a08377c4a1fc9684fa3bd695f375b1e5ee267ab (diff)
downloadcmake-a690523fcf31ca7dc062fca746c0f76e405c0e7a.tar.gz
cmFindPackageCommand: Drop ComputeIfDebugModeWanted overload
The overload for `--debug-find-pkg` has the same signature as the base class method for `--debug-find-var`. To avoid confusion, drop the overload and inline it its only call site.
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index fac0e08eee..c40fea022a 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -235,7 +235,8 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
this->SearchPathSuffixes.emplace_back();
// Process debug mode
- this->DebugMode = this->ComputeIfDebugModeWanted(this->Name);
+ this->DebugMode = this->ComputeIfDebugModeWanted() ||
+ this->Makefile->GetCMakeInstance()->GetDebugFindPkgOutput(this->Name);
this->DebugBuffer.clear();
// Parse the arguments.
@@ -621,12 +622,6 @@ bool cmFindPackageCommand::InitialPass(std::vector<std::string> const& args)
return loadedPackage;
}
-bool cmFindPackageCommand::ComputeIfDebugModeWanted(std::string const& var)
-{
- return this->ComputeIfDebugModeWanted() ||
- this->Makefile->GetCMakeInstance()->GetDebugFindPkgOutput(var);
-}
-
bool cmFindPackageCommand::FindPackageUsingModuleMode()
{
bool foundModule = false;