Use GetName from cmGeneratorTarget.
This commit is contained in:
parent
ed09f3b292
commit
b857f0d84b
|
@ -274,7 +274,7 @@ void cmExportBuildFileGenerator
|
|||
tei = this->ExportSet->GetTargetExports()->begin();
|
||||
tei != this->ExportSet->GetTargetExports()->end(); ++tei)
|
||||
{
|
||||
targets.push_back((*tei)->Target->GetName());
|
||||
targets.push_back((*tei)->GetName());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1421,7 +1421,7 @@ void cmLocalGenerator::GetTargetFlags(std::string& linkLibs,
|
|||
{
|
||||
cmSystemTools::Error
|
||||
("CMake can not determine linker language for target: ",
|
||||
target->Target->GetName().c_str());
|
||||
target->GetName().c_str());
|
||||
return;
|
||||
}
|
||||
this->AddLanguageFlags(flags, linkLanguage, buildType);
|
||||
|
|
|
@ -168,7 +168,7 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
|||
if(linkLanguage.empty())
|
||||
{
|
||||
cmSystemTools::Error("Cannot determine link language for target \"",
|
||||
this->Target->GetName().c_str(), "\".");
|
||||
this->GeneratorTarget->GetName().c_str(), "\".");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,11 +122,11 @@ void cmMakefileLibraryTargetGenerator::WriteObjectLibraryRules()
|
|||
|
||||
// Write the rule.
|
||||
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
|
||||
this->Target->GetName(),
|
||||
this->GeneratorTarget->GetName(),
|
||||
depends, commands, true);
|
||||
|
||||
// Write the main driver rule to build everything in this target.
|
||||
this->WriteTargetDriverRule(this->Target->GetName(), false);
|
||||
this->WriteTargetDriverRule(this->GeneratorTarget->GetName(), false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -244,7 +244,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||
if(linkLanguage.empty())
|
||||
{
|
||||
cmSystemTools::Error("Cannot determine link language for target \"",
|
||||
this->Target->GetName().c_str(), "\".");
|
||||
this->GeneratorTarget->GetName().c_str(), "\".");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -574,7 +574,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||
std::string name_of_def_file =
|
||||
this->GeneratorTarget->GetSupportDirectory();
|
||||
name_of_def_file += std::string("/") +
|
||||
this->Target->GetName();
|
||||
this->GeneratorTarget->GetName();
|
||||
name_of_def_file += ".def";
|
||||
std::string cmd = cmSystemTools::GetCMakeCommand();
|
||||
cmd = this->Convert(cmd, cmLocalGenerator::NONE,
|
||||
|
|
|
@ -248,7 +248,8 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
|
|||
// Write an empty dependency file.
|
||||
cmGeneratedFileStream depFileStream(dependFileNameFull.c_str());
|
||||
depFileStream
|
||||
<< "# Empty dependencies file for " << this->Target->GetName() << ".\n"
|
||||
<< "# Empty dependencies file for "
|
||||
<< this->GeneratorTarget->GetName() << ".\n"
|
||||
<< "# This may be replaced when dependencies are built." << std::endl;
|
||||
}
|
||||
|
||||
|
@ -394,7 +395,7 @@ void cmMakefileTargetGenerator
|
|||
err << "Warning: Source file \""
|
||||
<< source.GetFullPath()
|
||||
<< "\" is listed multiple times for target \""
|
||||
<< this->Target->GetName()
|
||||
<< this->GeneratorTarget->GetName()
|
||||
<< "\".";
|
||||
cmSystemTools::Message(err.str().c_str(), "Warning");
|
||||
return;
|
||||
|
@ -1267,10 +1268,10 @@ cmMakefileTargetGenerator
|
|||
// Write a make variable assignment that lists all objects for the
|
||||
// target.
|
||||
variableName =
|
||||
this->LocalGenerator->CreateMakeVariable(this->Target->GetName(),
|
||||
this->LocalGenerator->CreateMakeVariable(this->GeneratorTarget->GetName(),
|
||||
"_OBJECTS");
|
||||
*this->BuildFileStream
|
||||
<< "# Object files for target " << this->Target->GetName() << "\n"
|
||||
<< "# Object files for target " << this->GeneratorTarget->GetName() << "\n"
|
||||
<< variableName << " =";
|
||||
std::string object;
|
||||
const char* lineContinue =
|
||||
|
@ -1292,12 +1293,12 @@ cmMakefileTargetGenerator
|
|||
// Write a make variable assignment that lists all external objects
|
||||
// for the target.
|
||||
variableNameExternal =
|
||||
this->LocalGenerator->CreateMakeVariable(this->Target->GetName(),
|
||||
this->LocalGenerator->CreateMakeVariable(this->GeneratorTarget->GetName(),
|
||||
"_EXTERNAL_OBJECTS");
|
||||
*this->BuildFileStream
|
||||
<< "\n"
|
||||
<< "# External object files for target "
|
||||
<< this->Target->GetName() << "\n"
|
||||
<< this->GeneratorTarget->GetName() << "\n"
|
||||
<< variableNameExternal << " =";
|
||||
for(std::vector<std::string>::const_iterator i =
|
||||
this->ExternalObjects.begin();
|
||||
|
|
|
@ -42,7 +42,8 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
|
|||
this->CreateRuleFile();
|
||||
|
||||
*this->BuildFileStream
|
||||
<< "# Utility rule file for " << this->Target->GetName() << ".\n\n";
|
||||
<< "# Utility rule file for "
|
||||
<< this->GeneratorTarget->GetName() << ".\n\n";
|
||||
|
||||
if(!this->NoRuleMessages)
|
||||
{
|
||||
|
@ -101,11 +102,11 @@ void cmMakefileUtilityTargetGenerator::WriteRuleFiles()
|
|||
|
||||
// Write the rule.
|
||||
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
|
||||
this->Target->GetName(),
|
||||
this->GeneratorTarget->GetName(),
|
||||
depends, commands, true);
|
||||
|
||||
// Write the main driver rule to build everything in this target.
|
||||
this->WriteTargetDriverRule(this->Target->GetName(), false);
|
||||
this->WriteTargetDriverRule(this->GeneratorTarget->GetName(), false);
|
||||
|
||||
// Write clean target
|
||||
this->WriteTargetCleanRules();
|
||||
|
|
|
@ -77,7 +77,7 @@ void cmNinjaNormalTargetGenerator::Generate()
|
|||
if (this->TargetLinkLanguage.empty()) {
|
||||
cmSystemTools::Error("CMake can not determine linker language for "
|
||||
"target: ",
|
||||
this->GetTarget()->GetName().c_str());
|
||||
this->GetGeneratorTarget()->GetName().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,8 @@ cmNinjaNormalTargetGenerator
|
|||
+ "_"
|
||||
+ cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType())
|
||||
+ "_LINKER__"
|
||||
+ cmGlobalNinjaGenerator::EncodeRuleName(this->GetTarget()->GetName())
|
||||
+ cmGlobalNinjaGenerator::EncodeRuleName(
|
||||
this->GetGeneratorTarget()->GetName())
|
||||
;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ std::string cmNinjaTargetGenerator::LanguageCompilerRule(
|
|||
const std::string& lang) const
|
||||
{
|
||||
return lang + "_COMPILER__" +
|
||||
cmGlobalNinjaGenerator::EncodeRuleName(this->Target->GetName());
|
||||
cmGlobalNinjaGenerator::EncodeRuleName(this->GeneratorTarget->GetName());
|
||||
}
|
||||
|
||||
std::string
|
||||
|
@ -271,7 +271,7 @@ cmNinjaTargetGenerator
|
|||
|
||||
std::string cmNinjaTargetGenerator::GetTargetName() const
|
||||
{
|
||||
return this->Target->GetName();
|
||||
return this->GeneratorTarget->GetName();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -178,7 +178,7 @@ cmVisualStudio10TargetGenerator(cmTarget* target,
|
|||
this->LocalGenerator =
|
||||
(cmLocalVisualStudio7Generator*)
|
||||
this->GeneratorTarget->GetLocalGenerator();
|
||||
this->Name = this->Target->GetName();
|
||||
this->Name = this->GeneratorTarget->GetName();
|
||||
this->GUID = this->GlobalGenerator->GetGUID(this->Name.c_str());
|
||||
this->Platform = gg->GetPlatformName();
|
||||
this->NsightTegra = gg->IsNsightTegra();
|
||||
|
@ -1775,7 +1775,7 @@ void cmVisualStudio10TargetGenerator::WritePathAndIncrementalLinkOptions()
|
|||
if(ttype == cmState::OBJECT_LIBRARY)
|
||||
{
|
||||
outDir = intermediateDir;
|
||||
targetNameFull = this->Target->GetName();
|
||||
targetNameFull = this->GeneratorTarget->GetName();
|
||||
targetNameFull += ".lib";
|
||||
}
|
||||
else
|
||||
|
@ -3325,7 +3325,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP80()
|
|||
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
|
||||
this->ConvertToWindowsSlash(artifactDir);
|
||||
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
|
||||
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
|
||||
std::string targetNameXML =
|
||||
cmVS10EscapeXML(this->GeneratorTarget->GetName());
|
||||
|
||||
cmGeneratedFileStream fout(manifestFile.c_str());
|
||||
fout.SetCopyIfDifferent(true);
|
||||
|
@ -3408,7 +3409,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWP81()
|
|||
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
|
||||
this->ConvertToWindowsSlash(artifactDir);
|
||||
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
|
||||
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
|
||||
std::string targetNameXML =
|
||||
cmVS10EscapeXML(this->GeneratorTarget->GetName());
|
||||
|
||||
cmGeneratedFileStream fout(manifestFile.c_str());
|
||||
fout.SetCopyIfDifferent(true);
|
||||
|
@ -3468,7 +3470,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS80()
|
|||
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
|
||||
this->ConvertToWindowsSlash(artifactDir);
|
||||
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
|
||||
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
|
||||
std::string targetNameXML =
|
||||
cmVS10EscapeXML(this->GeneratorTarget->GetName());
|
||||
|
||||
cmGeneratedFileStream fout(manifestFile.c_str());
|
||||
fout.SetCopyIfDifferent(true);
|
||||
|
@ -3520,7 +3523,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS81()
|
|||
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
|
||||
this->ConvertToWindowsSlash(artifactDir);
|
||||
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
|
||||
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
|
||||
std::string targetNameXML =
|
||||
cmVS10EscapeXML(this->GeneratorTarget->GetName());
|
||||
|
||||
cmGeneratedFileStream fout(manifestFile.c_str());
|
||||
fout.SetCopyIfDifferent(true);
|
||||
|
@ -3577,7 +3581,8 @@ void cmVisualStudio10TargetGenerator::WriteMissingFilesWS10_0()
|
|||
this->LocalGenerator->GetTargetDirectory(this->GeneratorTarget);
|
||||
this->ConvertToWindowsSlash(artifactDir);
|
||||
std::string artifactDirXML = cmVS10EscapeXML(artifactDir);
|
||||
std::string targetNameXML = cmVS10EscapeXML(this->Target->GetName());
|
||||
std::string targetNameXML =
|
||||
cmVS10EscapeXML(this->GeneratorTarget->GetName());
|
||||
|
||||
cmGeneratedFileStream fout(manifestFile.c_str());
|
||||
fout.SetCopyIfDifferent(true);
|
||||
|
|
Loading…
Reference in New Issue