From 2cbf031190e6b7981974e452c49dafd73dea4a4b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Fri, 10 Jan 2014 13:51:29 +0100 Subject: [PATCH] cmGlobalGenerator: Make SelectMakeProgram const. --- Source/cmGlobalGenerator.cxx | 8 ++++---- Source/cmGlobalGenerator.h | 8 ++++---- Source/cmGlobalVisualStudioGenerator.h | 2 +- Source/cmGlobalXCodeGenerator.h | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index a50721c33..549d51bc7 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -90,7 +90,7 @@ bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts) } std::string cmGlobalGenerator::SelectMakeProgram(const char* makeProgram, - std::string makeDefault) + std::string makeDefault) const { if(cmSystemTools::IsOff(makeProgram)) { @@ -111,7 +111,7 @@ std::string cmGlobalGenerator::SelectMakeProgram(const char* makeProgram, void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang, cmMakefile *mf, - bool optional) + bool optional) const { std::string langComp = "CMAKE_"; langComp += lang; @@ -723,7 +723,7 @@ cmGlobalGenerator::EnableLanguage(std::vectorconst& languages, //---------------------------------------------------------------------------- void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os, std::string lang, - const char* envVar) + const char* envVar) const { // Subclasses override this method if they do not support this advice. os << @@ -744,7 +744,7 @@ void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os, //---------------------------------------------------------------------------- void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf, - std::string lang) + std::string lang) const { std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID"; const char* compilerId = mf->GetDefinition(compilerIdVar.c_str()); diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index e2d751531..373328850 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -93,7 +93,7 @@ public: * Intended to be called from EnableLanguage. */ void ResolveLanguageCompiler(const std::string &lang, cmMakefile *mf, - bool optional); + bool optional) const; /** * Try to determine system infomation, get it from another generator @@ -342,7 +342,7 @@ protected: void CreateQtAutoGeneratorsTargets(AutogensType& autogens); std::string SelectMakeProgram(const char* makeProgram, - std::string makeDefault = ""); + std::string makeDefault = "") const; // Fill the ProjectMap, this must be called after LocalGenerators // has been populated. @@ -418,8 +418,8 @@ private: void FinalizeTargetCompileInfo(); virtual void PrintCompilerAdvice(std::ostream& os, std::string lang, - const char* envVar); - void CheckCompilerIdCompatibility(cmMakefile* mf, std::string lang); + const char* envVar) const; + void CheckCompilerIdCompatibility(cmMakefile* mf, std::string lang) const; cmExternalMakefileProjectGenerator* ExtraGenerator; diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h index 54e3c2817..eab613d30 100644 --- a/Source/cmGlobalVisualStudioGenerator.h +++ b/Source/cmGlobalVisualStudioGenerator.h @@ -110,7 +110,7 @@ protected: private: virtual std::string GetVSMakeProgram() = 0; - void PrintCompilerAdvice(std::ostream&, std::string, const char*) {} + void PrintCompilerAdvice(std::ostream&, std::string, const char*) const {} void ComputeTargetObjects(cmGeneratorTarget* gt) const; void FollowLinkDepends(cmTarget const* target, diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index 6281c3b6e..ae7f07e2d 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -212,7 +212,7 @@ protected: std::vector XCodeObjects; cmXCodeObject* RootObject; private: - void PrintCompilerAdvice(std::ostream&, std::string, const char*) {} + void PrintCompilerAdvice(std::ostream&, std::string, const char*) const {} void ComputeTargetObjects(cmGeneratorTarget* gt) const; std::string GetObjectsNormalDirectory(