Browse Source

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.
Brad King 3 years ago
parent
commit
a690523fcf
2 changed files with 2 additions and 9 deletions
  1. 2 7
      Source/cmFindPackageCommand.cxx
  2. 0 2
      Source/cmFindPackageCommand.h

+ 2 - 7
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;

+ 0 - 2
Source/cmFindPackageCommand.h

@@ -40,7 +40,6 @@ class cmSearchPath;
 class cmFindPackageCommand : public cmFindCommon
 {
 public:
-  using cmFindCommon::ComputeIfDebugModeWanted;
   /*! A sorting order strategy to be applied to recovered package folders (see
    * FIND_PACKAGE_SORT_ORDER)*/
   enum /*class*/ SortOrderType
@@ -121,7 +120,6 @@ private:
   bool ReadListFile(const std::string& f, PolicyScopeRule psr);
   void StoreVersionFound();
 
-  bool ComputeIfDebugModeWanted(std::string const& var);
   void ComputePrefixes();
   void FillPrefixesPackageRoot();
   void FillPrefixesCMakeEnvironment();