From 9c0a00d6dd6e7419eba61bcac30bdd0715b8b2cd Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 8 Mar 2012 16:18:55 -0500 Subject: [PATCH] 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. --- Source/cmGlobalGenerator.cxx | 2 +- Source/cmGlobalGenerator.h | 2 +- Source/cmGlobalVisualStudio10Generator.h | 2 +- Source/cmGlobalVisualStudio6Generator.h | 2 +- Source/cmGlobalVisualStudio7Generator.h | 2 +- Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmGlobalXCodeGenerator.h | 2 +- Source/cmMakefile.cxx | 4 ++-- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d7ba8b6fb..545f9e87f 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/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 diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index e818e37e9..80b948bc4 100644 --- a/Source/cmGlobalGenerator.h +++ b/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; } diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h index 18b483d09..750b89c4c 100644 --- a/Source/cmGlobalVisualStudio10Generator.h +++ b/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: diff --git a/Source/cmGlobalVisualStudio6Generator.h b/Source/cmGlobalVisualStudio6Generator.h index 77d537075..da08a125b 100644 --- a/Source/cmGlobalVisualStudio6Generator.h +++ b/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"; } diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index adfb757f1..c92998e7e 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/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. */ diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index e552928f6..a6a920098 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/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)" : "."; diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 45f62eb36..b9cf775d0 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/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*); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index f90c35c38..68a827251 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -945,7 +945,7 @@ cmMakefile::AddCustomCommandToOutput(const std::vector& 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 const & lang, { this->AddDefinition("CMAKE_CFG_INTDIR", this->LocalGenerator->GetGlobalGenerator() - ->GetCMakeCFGInitDirectory()); + ->GetCMakeCFGIntDir()); this->LocalGenerator->GetGlobalGenerator()->EnableLanguage(lang, this, optional); }