1
0
Эх сурвалжийг харах

cmGlobalGenerator::PrintCompilerAdvice: use cmProp as augment

Marc Chevrier 4 жил өмнө
parent
commit
dffa3f485c

+ 2 - 2
Source/cmGlobalGenerator.cxx

@@ -838,7 +838,7 @@ void cmGlobalGenerator::EnableLanguage(
         cmSystemTools::RemoveFile(compilerLangFile);
         cmSystemTools::RemoveFile(compilerLangFile);
         if (!this->CMakeInstance->GetIsInTryCompile()) {
         if (!this->CMakeInstance->GetIsInTryCompile()) {
           this->PrintCompilerAdvice(noCompiler, lang,
           this->PrintCompilerAdvice(noCompiler, lang,
-                                    cmToCStr(mf->GetDefinition(compilerEnv)));
+                                    mf->GetDefinition(compilerEnv));
           mf->IssueMessage(MessageType::FATAL_ERROR, noCompiler.str());
           mf->IssueMessage(MessageType::FATAL_ERROR, noCompiler.str());
           fatalError = true;
           fatalError = true;
         }
         }
@@ -922,7 +922,7 @@ void cmGlobalGenerator::EnableLanguage(
 
 
 void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os,
 void cmGlobalGenerator::PrintCompilerAdvice(std::ostream& os,
                                             std::string const& lang,
                                             std::string const& lang,
-                                            const char* envVar) const
+                                            cmProp 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 << "Tell CMake where to find the compiler by setting ";
   os << "Tell CMake where to find the compiler by setting ";

+ 1 - 1
Source/cmGlobalGenerator.h

@@ -550,7 +550,7 @@ protected:
   virtual bool CheckLanguages(std::vector<std::string> const& languages,
   virtual bool CheckLanguages(std::vector<std::string> const& languages,
                               cmMakefile* mf) const;
                               cmMakefile* mf) const;
   virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
   virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
-                                   const char* envVar) const;
+                                   cmProp envVar) const;
 
 
   virtual bool ComputeTargetDepends();
   virtual bool ComputeTargetDepends();
 
 

+ 3 - 2
Source/cmGlobalJOMMakefileGenerator.cxx

@@ -39,8 +39,9 @@ void cmGlobalJOMMakefileGenerator::GetDocumentation(
   entry.Brief = "Generates JOM makefiles.";
   entry.Brief = "Generates JOM makefiles.";
 }
 }
 
 
-void cmGlobalJOMMakefileGenerator::PrintCompilerAdvice(
-  std::ostream& os, std::string const& lang, const char* envVar) const
+void cmGlobalJOMMakefileGenerator::PrintCompilerAdvice(std::ostream& os,
+                                                       std::string const& lang,
+                                                       cmProp envVar) const
 {
 {
   if (lang == "CXX" || lang == "C") {
   if (lang == "CXX" || lang == "C") {
     /* clang-format off */
     /* clang-format off */

+ 1 - 1
Source/cmGlobalJOMMakefileGenerator.h

@@ -50,5 +50,5 @@ protected:
 
 
 private:
 private:
   void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
   void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
-                           const char* envVar) const override;
+                           cmProp envVar) const override;
 };
 };

+ 1 - 1
Source/cmGlobalNMakeMakefileGenerator.cxx

@@ -81,7 +81,7 @@ void cmGlobalNMakeMakefileGenerator::GetDocumentation(
 }
 }
 
 
 void cmGlobalNMakeMakefileGenerator::PrintCompilerAdvice(
 void cmGlobalNMakeMakefileGenerator::PrintCompilerAdvice(
-  std::ostream& os, std::string const& lang, const char* envVar) const
+  std::ostream& os, std::string const& lang, cmProp envVar) const
 {
 {
   if (lang == "CXX" || lang == "C") {
   if (lang == "CXX" || lang == "C") {
     /* clang-format off */
     /* clang-format off */

+ 1 - 1
Source/cmGlobalNMakeMakefileGenerator.h

@@ -61,5 +61,5 @@ private:
   void CheckNMakeFeatures();
   void CheckNMakeFeatures();
 
 
   void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
   void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
-                           const char* envVar) const override;
+                           cmProp envVar) const override;
 };
 };

+ 1 - 1
Source/cmGlobalVisualStudioGenerator.h

@@ -201,7 +201,7 @@ protected:
 private:
 private:
   virtual std::string GetVSMakeProgram() = 0;
   virtual std::string GetVSMakeProgram() = 0;
   void PrintCompilerAdvice(std::ostream&, std::string const&,
   void PrintCompilerAdvice(std::ostream&, std::string const&,
-                           const char*) const override
+                           cmProp) const override
   {
   {
   }
   }
 
 

+ 1 - 1
Source/cmGlobalXCodeGenerator.h

@@ -327,7 +327,7 @@ private:
   bool XcodeBuildCommandInitialized;
   bool XcodeBuildCommandInitialized;
 
 
   void PrintCompilerAdvice(std::ostream&, std::string const&,
   void PrintCompilerAdvice(std::ostream&, std::string const&,
-                           const char*) const override
+                           cmProp) const override
   {
   {
   }
   }