cmGeneratorTarget: Move GetPDBDirectory from cmTarget.
This commit is contained in:
parent
8b0168863e
commit
50dc9b4440
@ -1631,7 +1631,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag>
|
|||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string result = target->Target->GetPDBDirectory(context->Config);
|
std::string result = target->GetPDBDirectory(context->Config);
|
||||||
result += "/";
|
result += "/";
|
||||||
result += target->GetPDBName(context->Config);
|
result += target->GetPDBName(context->Config);
|
||||||
return result;
|
return result;
|
||||||
|
@ -1130,7 +1130,7 @@ cmGeneratorTarget::GetCompilePDBPath(const std::string& config) const
|
|||||||
std::string name = this->GetCompilePDBName(config);
|
std::string name = this->GetCompilePDBName(config);
|
||||||
if(dir.empty() && !name.empty())
|
if(dir.empty() && !name.empty())
|
||||||
{
|
{
|
||||||
dir = this->Target->GetPDBDirectory(config);
|
dir = this->GetPDBDirectory(config);
|
||||||
}
|
}
|
||||||
if(!dir.empty())
|
if(!dir.empty())
|
||||||
{
|
{
|
||||||
@ -4995,3 +4995,15 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
std::string
|
||||||
|
cmGeneratorTarget::GetPDBDirectory(const std::string& config) const
|
||||||
|
{
|
||||||
|
if(cmTarget::OutputInfo const* info = this->Target->GetOutputInfo(config))
|
||||||
|
{
|
||||||
|
// Return the directory in which the target will be built.
|
||||||
|
return info->PdbDir;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
@ -359,6 +359,12 @@ public:
|
|||||||
/** Return true if builtin chrpath will work for this target */
|
/** Return true if builtin chrpath will work for this target */
|
||||||
bool IsChrpathUsed(const std::string& config) const;
|
bool IsChrpathUsed(const std::string& config) const;
|
||||||
|
|
||||||
|
/** Get the directory in which this targets .pdb files will be placed.
|
||||||
|
If the configuration name is given then the generator will add its
|
||||||
|
subdirectory for that configuration. Otherwise just the canonical
|
||||||
|
pdb output directory is given. */
|
||||||
|
std::string GetPDBDirectory(const std::string& config) const;
|
||||||
|
|
||||||
///! Return the preferred linker language for this target
|
///! Return the preferred linker language for this target
|
||||||
std::string GetLinkerLanguage(const std::string& config = "") const;
|
std::string GetLinkerLanguage(const std::string& config = "") const;
|
||||||
|
|
||||||
|
@ -1220,7 +1220,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
|
fout << "\t\t\t\tAdditionalLibraryDirectories=\"";
|
||||||
this->OutputLibraryDirectories(fout, cli.GetDirectories());
|
this->OutputLibraryDirectories(fout, cli.GetDirectories());
|
||||||
fout << "\"\n";
|
fout << "\"\n";
|
||||||
temp = target.GetPDBDirectory(configName);
|
temp = gt->GetPDBDirectory(configName);
|
||||||
temp += "/";
|
temp += "/";
|
||||||
temp += targetNamePDB;
|
temp += targetNamePDB;
|
||||||
fout << "\t\t\t\tProgramDatabaseFile=\"" <<
|
fout << "\t\t\t\tProgramDatabaseFile=\"" <<
|
||||||
@ -1320,7 +1320,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout,
|
|||||||
this->OutputLibraryDirectories(fout, cli.GetDirectories());
|
this->OutputLibraryDirectories(fout, cli.GetDirectories());
|
||||||
fout << "\"\n";
|
fout << "\"\n";
|
||||||
std::string path = this->ConvertToXMLOutputPathSingle(
|
std::string path = this->ConvertToXMLOutputPathSingle(
|
||||||
target.GetPDBDirectory(configName).c_str());
|
gt->GetPDBDirectory(configName).c_str());
|
||||||
fout << "\t\t\t\tProgramDatabaseFile=\""
|
fout << "\t\t\t\tProgramDatabaseFile=\""
|
||||||
<< path << "/" << targetNamePDB
|
<< path << "/" << targetNamePDB
|
||||||
<< "\"\n";
|
<< "\"\n";
|
||||||
|
@ -133,7 +133,8 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
|
|||||||
this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
|
this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
|
||||||
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
|
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
|
||||||
|
|
||||||
std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
|
std::string pdbOutputPath =
|
||||||
|
this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
|
||||||
cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
|
cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
|
||||||
pdbOutputPath += "/";
|
pdbOutputPath += "/";
|
||||||
|
|
||||||
|
@ -314,7 +314,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
|||||||
this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
|
this->GeneratorTarget->GetCompilePDBDirectory(this->ConfigName);
|
||||||
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
|
cmSystemTools::MakeDirectory(compilePdbOutputPath.c_str());
|
||||||
|
|
||||||
std::string pdbOutputPath = this->Target->GetPDBDirectory(this->ConfigName);
|
std::string pdbOutputPath =
|
||||||
|
this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
|
||||||
cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
|
cmSystemTools::MakeDirectory(pdbOutputPath.c_str());
|
||||||
pdbOutputPath += "/";
|
pdbOutputPath += "/";
|
||||||
|
|
||||||
|
@ -546,7 +546,8 @@ cmMakefileTargetGenerator
|
|||||||
{
|
{
|
||||||
targetFullPathReal =
|
targetFullPathReal =
|
||||||
this->GeneratorTarget->GetFullPath(this->ConfigName, false, true);
|
this->GeneratorTarget->GetFullPath(this->ConfigName, false, true);
|
||||||
targetFullPathPDB = this->Target->GetPDBDirectory(this->ConfigName);
|
targetFullPathPDB =
|
||||||
|
this->GeneratorTarget->GetPDBDirectory(this->ConfigName);
|
||||||
targetFullPathPDB += "/";
|
targetFullPathPDB += "/";
|
||||||
targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName);
|
targetFullPathPDB += this->GeneratorTarget->GetPDBName(this->ConfigName);
|
||||||
}
|
}
|
||||||
|
@ -289,7 +289,7 @@ bool cmNinjaTargetGenerator::SetMsvcTargetPdbVariable(cmNinjaVars& vars) const
|
|||||||
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
this->Target->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||||
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
this->Target->GetType() == cmTarget::MODULE_LIBRARY)
|
||||||
{
|
{
|
||||||
pdbPath = this->Target->GetPDBDirectory(this->GetConfigName());
|
pdbPath = this->GeneratorTarget->GetPDBDirectory(this->GetConfigName());
|
||||||
pdbPath += "/";
|
pdbPath += "/";
|
||||||
pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName());
|
pdbPath += this->GeneratorTarget->GetPDBName(this->GetConfigName());
|
||||||
}
|
}
|
||||||
|
@ -1770,17 +1770,6 @@ cmTarget::OutputInfo const* cmTarget::GetOutputInfo(
|
|||||||
return &i->second;
|
return &i->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
std::string cmTarget::GetPDBDirectory(const std::string& config) const
|
|
||||||
{
|
|
||||||
if(OutputInfo const* info = this->GetOutputInfo(config))
|
|
||||||
{
|
|
||||||
// Return the directory in which the target will be built.
|
|
||||||
return info->PdbDir;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
const char* cmTarget::ImportedGetLocation(const std::string& config) const
|
const char* cmTarget::ImportedGetLocation(const std::string& config) const
|
||||||
{
|
{
|
||||||
|
@ -231,12 +231,6 @@ public:
|
|||||||
the link dependencies of this target. */
|
the link dependencies of this target. */
|
||||||
std::string CheckCMP0004(std::string const& item) const;
|
std::string CheckCMP0004(std::string const& item) const;
|
||||||
|
|
||||||
/** Get the directory in which this targets .pdb files will be placed.
|
|
||||||
If the configuration name is given then the generator will add its
|
|
||||||
subdirectory for that configuration. Otherwise just the canonical
|
|
||||||
pdb output directory is given. */
|
|
||||||
std::string GetPDBDirectory(const std::string& config) const;
|
|
||||||
|
|
||||||
const char* ImportedGetLocation(const std::string& config) const;
|
const char* ImportedGetLocation(const std::string& config) const;
|
||||||
|
|
||||||
/** Get the target major and minor version numbers interpreted from
|
/** Get the target major and minor version numbers interpreted from
|
||||||
|
@ -2581,7 +2581,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
|||||||
{
|
{
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "false");
|
linkOptions.AddFlag("GenerateDebugInformation", "false");
|
||||||
}
|
}
|
||||||
std::string pdb = this->Target->GetPDBDirectory(config.c_str());
|
std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
|
||||||
pdb += "/";
|
pdb += "/";
|
||||||
pdb += targetNamePDB;
|
pdb += targetNamePDB;
|
||||||
std::string imLib =
|
std::string imLib =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user