Browse Source

cmGlobalGenerator: Make SelectMakeProgram const.

Stephen Kelly 11 years ago
parent
commit
2cbf031190

+ 4 - 4
Source/cmGlobalGenerator.cxx

@@ -90,7 +90,7 @@ bool cmGlobalGenerator::SetGeneratorToolset(std::string const& ts)
 }
 }
 
 
 std::string cmGlobalGenerator::SelectMakeProgram(const char* makeProgram,
 std::string cmGlobalGenerator::SelectMakeProgram(const char* makeProgram,
-                                                 std::string makeDefault)
+                                                 std::string makeDefault) const
 {
 {
   if(cmSystemTools::IsOff(makeProgram))
   if(cmSystemTools::IsOff(makeProgram))
     {
     {
@@ -111,7 +111,7 @@ std::string cmGlobalGenerator::SelectMakeProgram(const char* makeProgram,
 
 
 void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
 void cmGlobalGenerator::ResolveLanguageCompiler(const std::string &lang,
                                                 cmMakefile *mf,
                                                 cmMakefile *mf,
-                                                bool optional)
+                                                bool optional) const
 {
 {
   std::string langComp = "CMAKE_";
   std::string langComp = "CMAKE_";
   langComp += lang;
   langComp += lang;
@@ -723,7 +723,7 @@ cmGlobalGenerator::EnableLanguage(std::vector<std::string>const& languages,
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os,
 void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os,
                                             std::string lang,
                                             std::string lang,
-                                            const char* envVar)
+                                            const char* envVar) const
 {
 {
   // Subclasses override this method if they do not support this advice.
   // Subclasses override this method if they do not support this advice.
   os <<
   os <<
@@ -744,7 +744,7 @@ void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os,
 
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
 void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
 void cmGlobalGenerator::CheckCompilerIdCompatibility(cmMakefile* mf,
-                                                     std::string lang)
+                                                     std::string lang) const
 {
 {
   std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID";
   std::string compilerIdVar = "CMAKE_" + lang + "_COMPILER_ID";
   const char* compilerId = mf->GetDefinition(compilerIdVar.c_str());
   const char* compilerId = mf->GetDefinition(compilerIdVar.c_str());

+ 4 - 4
Source/cmGlobalGenerator.h

@@ -93,7 +93,7 @@ public:
    * Intended to be called from EnableLanguage.
    * Intended to be called from EnableLanguage.
    */
    */
   void ResolveLanguageCompiler(const std::string &lang, cmMakefile *mf,
   void ResolveLanguageCompiler(const std::string &lang, cmMakefile *mf,
-                               bool optional);
+                               bool optional) const;
 
 
   /**
   /**
    * Try to determine system infomation, get it from another generator
    * Try to determine system infomation, get it from another generator
@@ -342,7 +342,7 @@ protected:
   void CreateQtAutoGeneratorsTargets(AutogensType& autogens);
   void CreateQtAutoGeneratorsTargets(AutogensType& autogens);
 
 
   std::string SelectMakeProgram(const char* makeProgram,
   std::string SelectMakeProgram(const char* makeProgram,
-                                std::string makeDefault = "");
+                                std::string makeDefault = "") const;
 
 
   // Fill the ProjectMap, this must be called after LocalGenerators
   // Fill the ProjectMap, this must be called after LocalGenerators
   // has been populated.
   // has been populated.
@@ -418,8 +418,8 @@ private:
   void FinalizeTargetCompileInfo();
   void FinalizeTargetCompileInfo();
 
 
   virtual void PrintCompilerAdvice(std::ostream& os, std::string lang,
   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;
   cmExternalMakefileProjectGenerator* ExtraGenerator;
 
 

+ 1 - 1
Source/cmGlobalVisualStudioGenerator.h

@@ -110,7 +110,7 @@ protected:
 
 
 private:
 private:
   virtual std::string GetVSMakeProgram() = 0;
   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 ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
 
   void FollowLinkDepends(cmTarget const* target,
   void FollowLinkDepends(cmTarget const* target,

+ 1 - 1
Source/cmGlobalXCodeGenerator.h

@@ -212,7 +212,7 @@ protected:
   std::vector<cmXCodeObject*> XCodeObjects;
   std::vector<cmXCodeObject*> XCodeObjects;
   cmXCodeObject* RootObject;
   cmXCodeObject* RootObject;
 private:
 private:
-  void PrintCompilerAdvice(std::ostream&, std::string, const char*) {}
+  void PrintCompilerAdvice(std::ostream&, std::string, const char*) const {}
   void ComputeTargetObjects(cmGeneratorTarget* gt) const;
   void ComputeTargetObjects(cmGeneratorTarget* gt) const;
 
 
   std::string GetObjectsNormalDirectory(
   std::string GetObjectsNormalDirectory(