cmGeneratorTarget: Move GetPDBName from cmTarget.
This commit is contained in:
parent
a45fed81e5
commit
3df705681b
|
@ -1625,7 +1625,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
|
|||
|
||||
std::string result = target->Target->GetPDBDirectory(context->Config);
|
||||
result += "/";
|
||||
result += target->Target->GetPDBName(context->Config);
|
||||
result += target->GetPDBName(context->Config);
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1525,7 +1525,7 @@ void cmGeneratorTarget::GetLibraryNames(std::string& name,
|
|||
}
|
||||
|
||||
// The program database file name.
|
||||
pdbName = this->Target->GetPDBName(config);
|
||||
pdbName = this->GetPDBName(config);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
@ -1587,7 +1587,39 @@ void cmGeneratorTarget::GetExecutableNames(std::string& name,
|
|||
impName = this->Target->GetFullNameInternal(config, true);
|
||||
|
||||
// The program database file name.
|
||||
pdbName = this->Target->GetPDBName(config);
|
||||
pdbName = this->GetPDBName(config);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmGeneratorTarget::GetPDBName(const std::string& config) const
|
||||
{
|
||||
std::string prefix;
|
||||
std::string base;
|
||||
std::string suffix;
|
||||
this->Target->GetFullNameInternal(config, false, prefix, base, suffix);
|
||||
|
||||
std::vector<std::string> props;
|
||||
std::string configUpper =
|
||||
cmSystemTools::UpperCase(config);
|
||||
if(!configUpper.empty())
|
||||
{
|
||||
// PDB_NAME_<CONFIG>
|
||||
props.push_back("PDB_NAME_" + configUpper);
|
||||
}
|
||||
|
||||
// PDB_NAME
|
||||
props.push_back("PDB_NAME");
|
||||
|
||||
for(std::vector<std::string>::const_iterator i = props.begin();
|
||||
i != props.end(); ++i)
|
||||
{
|
||||
if(const char* outName = this->GetProperty(*i))
|
||||
{
|
||||
base = outName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return prefix+base+".pdb";
|
||||
}
|
||||
|
||||
bool cmStrictTargetComparison::operator()(cmTarget const* t1,
|
||||
|
|
|
@ -160,6 +160,9 @@ public:
|
|||
std::vector<cmSourceFile*> const*
|
||||
GetSourceDepends(cmSourceFile const* sf) const;
|
||||
|
||||
/** Get the name of the pdb file for the target. */
|
||||
std::string GetPDBName(const std::string& config="") const;
|
||||
|
||||
/** Whether this library has soname enabled and platform supports it. */
|
||||
bool HasSOName(const std::string& config) const;
|
||||
|
||||
|
|
|
@ -548,7 +548,7 @@ cmMakefileTargetGenerator
|
|||
this->GeneratorTarget->GetFullPath(this->ConfigName, false, true);
|
||||
targetFullPathPDB = this->Target->GetPDBDirectory(this->ConfigName);
|
||||
targetFullPathPDB += "/";
|
||||
targetFullPathPDB += this->Target->GetPDBName(this->ConfigName);
|
||||
targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName);
|
||||
}
|
||||
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
{
|
||||
|
|
|
@ -273,7 +273,7 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
|
|||
{
|
||||
pdbPath = this->Target->GetPDBDirectory(this->GetConfigName());
|
||||
pdbPath += "/";
|
||||
pdbPath += this->Target->GetPDBName(this->GetConfigName());
|
||||
pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName());
|
||||
}
|
||||
if(this->Target->GetType() <= cmTarget::OBJECT_LIBRARY)
|
||||
{
|
||||
|
|
|
@ -3460,37 +3460,6 @@ const char* cmTarget::GetPrefixVariableInternal(bool implib) const
|
|||
return "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
std::string cmTarget::GetPDBName(const std::string& config) const
|
||||
{
|
||||
std::string prefix;
|
||||
std::string base;
|
||||
std::string suffix;
|
||||
this->GetFullNameInternal(config, false, prefix, base, suffix);
|
||||
|
||||
std::vector<std::string> props;
|
||||
std::string configUpper = cmSystemTools::UpperCase(config);
|
||||
if(!configUpper.empty())
|
||||
{
|
||||
// PDB_NAME_<CONFIG>
|
||||
props.push_back("PDB_NAME_" + configUpper);
|
||||
}
|
||||
|
||||
// PDB_NAME
|
||||
props.push_back("PDB_NAME");
|
||||
|
||||
for(std::vector<std::string>::const_iterator i = props.begin();
|
||||
i != props.end(); ++i)
|
||||
{
|
||||
if(const char* outName = this->GetProperty(*i))
|
||||
{
|
||||
base = outName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return prefix+base+".pdb";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::HasMacOSXRpathInstallNameDir(const std::string& config) const
|
||||
{
|
||||
|
|
|
@ -377,9 +377,6 @@ public:
|
|||
const std::string& config="",
|
||||
bool implib = false) const;
|
||||
|
||||
/** Get the name of the pdb file for the target. */
|
||||
std::string GetPDBName(const std::string& config) const;
|
||||
|
||||
/** Whether this library has \@rpath and platform supports it. */
|
||||
bool HasMacOSXRpathInstallNameDir(const std::string& config) const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue