Ninja: remove GetTargetPDB because it is used only once

This commit is contained in:
Peter Kümmel 2012-08-22 12:42:16 +02:00
parent 4bb4787780
commit 709fa59562
2 changed files with 11 additions and 17 deletions

View File

@ -295,21 +295,6 @@ std::string cmNinjaTargetGenerator::GetTargetName() const
return this->Target->GetName();
}
std::string cmNinjaTargetGenerator::GetTargetPDB() const
{
std::string targetFullPathPDB;
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
{
targetFullPathPDB = this->Target->GetDirectory(this->GetConfigName());
targetFullPathPDB += "/";
targetFullPathPDB += this->Target->GetPDBName(this->GetConfigName());
}
return targetFullPathPDB.c_str();
}
bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
{
@ -317,7 +302,17 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
if (mf->GetDefinition("MSVC_C_ARCHITECTURE_ID") ||
mf->GetDefinition("MSVC_CXX_ARCHITECTURE_ID"))
{
const std::string pdbPath = this->GetTargetPDB();
std::string pdbPath;
if(this->Target->GetType() == cmTarget::EXECUTABLE ||
this->Target->GetType() == cmTarget::STATIC_LIBRARY ||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
{
pdbPath = this->Target->GetDirectory(this->GetConfigName());
pdbPath += "/";
pdbPath += this->Target->GetPDBName(this->GetConfigName());
}
vars["TARGET_PDB"] = this->GetLocalGenerator()->ConvertToOutputFormat(
ConvertToNinjaPath(pdbPath.c_str()).c_str(),
cmLocalGenerator::SHELL);

View File

@ -40,7 +40,6 @@ public:
virtual void Generate() = 0;
std::string GetTargetPDB() const;
std::string GetTargetName() const;
protected: