Commit 857d30b5 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

cmGlobalGenerator: Add interface to call ForceLinkerLanguages

Avoid calling it too early when cmGeneratorTarget instances don't
yet exist.
parent 28e1d2f8
...@@ -216,6 +216,11 @@ bool cmGlobalGenerator::GenerateImportFile(const std::string &file) ...@@ -216,6 +216,11 @@ bool cmGlobalGenerator::GenerateImportFile(const std::string &file)
return false; return false;
} }
void cmGlobalGenerator::ForceLinkerLanguages()
{
}
bool bool
cmGlobalGenerator::IsExportedTargetsFile(const std::string &filename) const cmGlobalGenerator::IsExportedTargetsFile(const std::string &filename) const
{ {
...@@ -1194,6 +1199,8 @@ void cmGlobalGenerator::Generate() ...@@ -1194,6 +1199,8 @@ void cmGlobalGenerator::Generate()
// Create per-target generator information. // Create per-target generator information.
this->CreateGeneratorTargets(); this->CreateGeneratorTargets();
this->ForceLinkerLanguages();
#ifdef CMAKE_BUILD_WITH_CMAKE #ifdef CMAKE_BUILD_WITH_CMAKE
for (AutogensType::iterator it = autogens.begin(); it != autogens.end(); for (AutogensType::iterator it = autogens.begin(); it != autogens.end();
++it) ++it)
......
...@@ -423,6 +423,8 @@ private: ...@@ -423,6 +423,8 @@ private:
void WriteSummary(cmTarget* target); void WriteSummary(cmTarget* target);
void FinalizeTargetCompileInfo(); void FinalizeTargetCompileInfo();
virtual void ForceLinkerLanguages();
virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang, virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang,
const char* envVar) const; const char* envVar) const;
void CheckCompilerIdCompatibility(cmMakefile* mf, void CheckCompilerIdCompatibility(cmMakefile* mf,
......
...@@ -343,7 +343,6 @@ void cmGlobalXCodeGenerator::Generate() ...@@ -343,7 +343,6 @@ void cmGlobalXCodeGenerator::Generate()
// add ALL_BUILD, INSTALL, etc // add ALL_BUILD, INSTALL, etc
this->AddExtraTargets(root, it->second); this->AddExtraTargets(root, it->second);
} }
this->ForceLinkerLanguages();
this->cmGlobalGenerator::Generate(); this->cmGlobalGenerator::Generate();
if(cmSystemTools::GetErrorOccuredFlag()) if(cmSystemTools::GetErrorOccuredFlag())
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment