Browse Source

Merge topic 'fix-shadow-field-warnings'

54c51e79 cmCPackDragNDropGenerator: Drop unused member
7b02cb29 cmCommonTargetGenerator: Rename member to avoid shadowing
c1f15e1c cmGlobalGenerator: Rename member to avoid shadowing

Acked-by: Kitware Robot <[email protected]>
Merge-request: !968
Brad King 8 years ago
parent
commit
c670d1b50b

+ 0 - 2
Source/CPack/cmCPackDragNDropGenerator.h

@@ -40,8 +40,6 @@ protected:
 
   int CreateDMG(const std::string& src_dir, const std::string& output_file);
 
-  std::string InstallPrefix;
-
 private:
   std::string slaDirectory;
   bool singleLicense;

+ 18 - 16
Source/cmCommonTargetGenerator.cxx

@@ -22,10 +22,11 @@
 cmCommonTargetGenerator::cmCommonTargetGenerator(cmGeneratorTarget* gt)
   : GeneratorTarget(gt)
   , Makefile(gt->Makefile)
-  , LocalGenerator(static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
-  , GlobalGenerator(static_cast<cmGlobalCommonGenerator*>(
+  , LocalCommonGenerator(
+      static_cast<cmLocalCommonGenerator*>(gt->LocalGenerator))
+  , GlobalCommonGenerator(static_cast<cmGlobalCommonGenerator*>(
       gt->LocalGenerator->GetGlobalGenerator()))
-  , ConfigName(LocalGenerator->GetConfigName())
+  , ConfigName(LocalCommonGenerator->GetConfigName())
 {
 }
 
@@ -62,10 +63,10 @@ void cmCommonTargetGenerator::AddModuleDefinitionFlag(
   // Append the flag and value.  Use ConvertToLinkReference to help
   // vs6's "cl -link" pass it to the linker.
   std::string flag = defFileFlag;
-  flag += this->LocalGenerator->ConvertToOutputFormat(
+  flag += this->LocalCommonGenerator->ConvertToOutputFormat(
     linkLineComputer->ConvertToLinkReference(mdi->DefFile),
     cmOutputConverter::SHELL);
-  this->LocalGenerator->AppendFlags(flags, flag);
+  this->LocalCommonGenerator->AppendFlags(flags, flag);
 }
 
 void cmCommonTargetGenerator::AppendFortranFormatFlags(
@@ -90,8 +91,8 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
       break;
   }
   if (var) {
-    this->LocalGenerator->AppendFlags(flags,
-                                      this->Makefile->GetDefinition(var));
+    this->LocalCommonGenerator->AppendFlags(
+      flags, this->Makefile->GetDefinition(var));
   }
 }
 
@@ -101,8 +102,8 @@ std::string cmCommonTargetGenerator::GetFlags(const std::string& l)
   if (i == this->FlagsByLanguage.end()) {
     std::string flags;
 
-    this->LocalGenerator->GetTargetCompileFlags(this->GeneratorTarget,
-                                                this->ConfigName, l, flags);
+    this->LocalCommonGenerator->GetTargetCompileFlags(
+      this->GeneratorTarget, this->ConfigName, l, flags);
 
     ByLanguageMap::value_type entry(l, flags);
     i = this->FlagsByLanguage.insert(entry).first;
@@ -115,11 +116,11 @@ std::string cmCommonTargetGenerator::GetDefines(const std::string& l)
   ByLanguageMap::iterator i = this->DefinesByLanguage.find(l);
   if (i == this->DefinesByLanguage.end()) {
     std::set<std::string> defines;
-    this->LocalGenerator->GetTargetDefines(this->GeneratorTarget,
-                                           this->ConfigName, l, defines);
+    this->LocalCommonGenerator->GetTargetDefines(this->GeneratorTarget,
+                                                 this->ConfigName, l, defines);
 
     std::string definesString;
-    this->LocalGenerator->JoinDefines(defines, definesString, l);
+    this->LocalCommonGenerator->JoinDefines(defines, definesString, l);
 
     ByLanguageMap::value_type entry(l, definesString);
     i = this->DefinesByLanguage.insert(entry).first;
@@ -198,9 +199,10 @@ std::string cmCommonTargetGenerator::GetManifests()
   std::vector<std::string> manifests;
   for (std::vector<cmSourceFile const*>::iterator mi = manifest_srcs.begin();
        mi != manifest_srcs.end(); ++mi) {
-    manifests.push_back(this->LocalGenerator->ConvertToOutputFormat(
-      this->LocalGenerator->ConvertToRelativePath(
-        this->LocalGenerator->GetWorkingDirectory(), (*mi)->GetFullPath()),
+    manifests.push_back(this->LocalCommonGenerator->ConvertToOutputFormat(
+      this->LocalCommonGenerator->ConvertToRelativePath(
+        this->LocalCommonGenerator->GetWorkingDirectory(),
+        (*mi)->GetFullPath()),
       cmOutputConverter::SHELL));
   }
 
@@ -233,6 +235,6 @@ void cmCommonTargetGenerator::AppendOSXVerFlag(std::string& flags,
     // Append the flag since a non-zero version is specified.
     std::ostringstream vflag;
     vflag << flag << major << "." << minor << "." << patch;
-    this->LocalGenerator->AppendFlags(flags, vflag.str());
+    this->LocalCommonGenerator->AppendFlags(flags, vflag.str());
   }
 }

+ 2 - 2
Source/cmCommonTargetGenerator.h

@@ -37,8 +37,8 @@ protected:
 
   cmGeneratorTarget* GeneratorTarget;
   cmMakefile* Makefile;
-  cmLocalCommonGenerator* LocalGenerator;
-  cmGlobalCommonGenerator* GlobalGenerator;
+  cmLocalCommonGenerator* LocalCommonGenerator;
+  cmGlobalCommonGenerator* GlobalCommonGenerator;
   std::string ConfigName;
 
   void AppendFortranFormatFlags(std::string& flags,

+ 1 - 1
Source/cmGlobalGenerator.cxx

@@ -90,7 +90,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm)
   this->TryCompileTimeout = 0;
 
   this->ExtraGenerator = CM_NULLPTR;
-  this->CurrentMakefile = CM_NULLPTR;
+  this->CurrentConfigureMakefile = CM_NULLPTR;
   this->TryCompileOuterMakefile = CM_NULLPTR;
 
   this->ConfigureDoneCMP0026AndCMP0024 = false;

+ 9 - 3
Source/cmGlobalGenerator.h

@@ -187,9 +187,15 @@ public:
     return this->LocalGenerators;
   }
 
-  cmMakefile* GetCurrentMakefile() const { return this->CurrentMakefile; }
+  cmMakefile* GetCurrentMakefile() const
+  {
+    return this->CurrentConfigureMakefile;
+  }
 
-  void SetCurrentMakefile(cmMakefile* mf) { this->CurrentMakefile = mf; }
+  void SetCurrentMakefile(cmMakefile* mf)
+  {
+    this->CurrentConfigureMakefile = mf;
+  }
 
   void AddMakefile(cmMakefile* mf);
 
@@ -460,7 +466,7 @@ protected:
   cmake* CMakeInstance;
   std::vector<cmMakefile*> Makefiles;
   std::vector<cmLocalGenerator*> LocalGenerators;
-  cmMakefile* CurrentMakefile;
+  cmMakefile* CurrentConfigureMakefile;
   // map from project name to vector of local generators in that project
   std::map<std::string, std::vector<cmLocalGenerator*> > ProjectMap;