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.
This commit is contained in:
Brad King 2012-03-08 16:18:55 -05:00
parent 46f4940675
commit 9c0a00d6dd
8 changed files with 9 additions and 9 deletions

View File

@ -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

View File

@ -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; }

View File

@ -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:

View File

@ -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"; }

View File

@ -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. */

View File

@ -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)" : ".";

View File

@ -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*);

View File

@ -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);
}