Browse Source

Rename/constify build-time config placeholder lookup

Rename cmGlobalGenerator::GetCMakeCFG{InitDirectory => IntDir} to
have a shorter name without a typo.  Add a 'const' qualifier since
the method is only for lookup and never needs to modify anything.
Brad King 13 years ago
parent
commit
9c0a00d6dd

+ 1 - 1
Source/cmGlobalGenerator.cxx

@@ -1769,7 +1769,7 @@ void cmGlobalGenerator::SetCMakeInstance(cmake* cm)
 void cmGlobalGenerator::CreateDefaultGlobalTargets(cmTargets* targets)
 {
   cmMakefile* mf = this->LocalGenerators[0]->GetMakefile();
-  const char* cmakeCfgIntDir = this->GetCMakeCFGInitDirectory();
+  const char* cmakeCfgIntDir = this->GetCMakeCFGIntDir();
   const char* cmakeCommand = mf->GetRequiredDefinition("CMAKE_COMMAND");
 
   // CPack

+ 1 - 1
Source/cmGlobalGenerator.h

@@ -184,7 +184,7 @@ public:
   const char* GetLanguageOutputExtension(cmSourceFile const&);
 
   ///! What is the configurations directory variable called?
-  virtual const char* GetCMakeCFGInitDirectory()  { return "."; }
+  virtual const char* GetCMakeCFGIntDir() const { return "."; }
 
   /** Get whether the generator should use a script for link commands.  */
   bool GetUseLinkScript() const { return this->UseLinkScript; }

+ 1 - 1
Source/cmGlobalVisualStudio10Generator.h

@@ -72,7 +72,7 @@ public:
    * Studio?
    */
   virtual std::string GetUserMacrosRegKeyBase();
-  virtual const char* GetCMakeCFGInitDirectory() 
+  virtual const char* GetCMakeCFGIntDir() const
     { return "$(Configuration)";}
   bool Find64BitTools(cmMakefile* mf);
 protected:

+ 1 - 1
Source/cmGlobalVisualStudio6Generator.h

@@ -82,7 +82,7 @@ public:
                                         std::string& dir);
 
   ///! What is the configurations directory variable called?
-  virtual const char* GetCMakeCFGInitDirectory()  { return "$(IntDir)"; }
+  virtual const char* GetCMakeCFGIntDir() const { return "$(IntDir)"; }
 
 protected:
   virtual const char* GetIDEVersion() { return "6.0"; }

+ 1 - 1
Source/cmGlobalVisualStudio7Generator.h

@@ -87,7 +87,7 @@ public:
                                         std::string& dir);
 
   ///! What is the configurations directory variable called?
-  virtual const char* GetCMakeCFGInitDirectory()  { return "$(OutDir)"; }
+  virtual const char* GetCMakeCFGIntDir() const { return "$(OutDir)"; }
 
   /** Return true if the target project file should have the option
       LinkLibraryDependencies and link to .sln dependencies. */

+ 1 - 1
Source/cmGlobalXCodeGenerator.cxx

@@ -3283,7 +3283,7 @@ cmGlobalXCodeGenerator::WriteXCodePBXProj(std::ostream& fout,
 }
 
 //----------------------------------------------------------------------------
-const char* cmGlobalXCodeGenerator::GetCMakeCFGInitDirectory()
+const char* cmGlobalXCodeGenerator::GetCMakeCFGIntDir() const
 {
   return this->XcodeVersion >= 21 ?
     "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" : ".";

+ 1 - 1
Source/cmGlobalXCodeGenerator.h

@@ -74,7 +74,7 @@ public:
                                         std::string& dir);
 
   ///! What is the configurations directory variable called?
-  virtual const char* GetCMakeCFGInitDirectory();
+  virtual const char* GetCMakeCFGIntDir() const;
 
   void SetCurrentLocalGenerator(cmLocalGenerator*);
 

+ 2 - 2
Source/cmMakefile.cxx

@@ -945,7 +945,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector<std::string>& outputs,
     outName += ".rule";
     const char* dir =
       this->LocalGenerator->GetGlobalGenerator()->
-      GetCMakeCFGInitDirectory();
+      GetCMakeCFGIntDir();
     if(dir && dir[0] == '$')
       {
       cmSystemTools::ReplaceString(outName, dir,
@@ -2865,7 +2865,7 @@ void cmMakefile::EnableLanguage(std::vector<std::string> const &  lang,
 {
   this->AddDefinition("CMAKE_CFG_INTDIR",
                       this->LocalGenerator->GetGlobalGenerator()
-                      ->GetCMakeCFGInitDirectory());
+                      ->GetCMakeCFGIntDir());
   this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this,
                                                              optional);
 }