mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
Revert "Move GenerateTargetManifest to cmGeneratorTarget."
This reverts commit 987e12e2f9.
GenerateTargetManifest is called by the global generator before it
creates the generator targets, so we can't move it to cmGeneratorTarget
yet.
This commit is contained in:
@@ -218,78 +218,6 @@ void cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs)
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmGeneratorTarget::GenerateTargetManifest(const char* config)
|
||||
{
|
||||
cmMakefile* mf = this->Target->GetMakefile();
|
||||
cmLocalGenerator* lg = mf->GetLocalGenerator();
|
||||
cmGlobalGenerator* gg = lg->GetGlobalGenerator();
|
||||
|
||||
// Get the names.
|
||||
std::string name;
|
||||
std::string soName;
|
||||
std::string realName;
|
||||
std::string impName;
|
||||
std::string pdbName;
|
||||
if(this->GetType() == cmTarget::EXECUTABLE)
|
||||
{
|
||||
this->Target->GetExecutableNames(name, realName, impName, pdbName,
|
||||
config);
|
||||
}
|
||||
else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
{
|
||||
this->Target->GetLibraryNames(name, soName, realName, impName, pdbName,
|
||||
config);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the directory.
|
||||
std::string dir = this->Target->GetDirectory(config, false);
|
||||
|
||||
// Add each name.
|
||||
std::string f;
|
||||
if(!name.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += name;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!soName.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += soName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!realName.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += realName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!pdbName.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += pdbName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!impName.empty())
|
||||
{
|
||||
f = this->Target->GetDirectory(config, true);
|
||||
f += "/";
|
||||
f += impName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmComputeLinkInformation*
|
||||
cmGeneratorTarget::GetLinkInformation(const char* config)
|
||||
|
||||
@@ -60,9 +60,6 @@ public:
|
||||
|
||||
void UseObjectLibraries(std::vector<std::string>& objs);
|
||||
|
||||
/** Add the target output files to the global generator manifest. */
|
||||
void GenerateTargetManifest(const char* config);
|
||||
|
||||
std::map<cmStdString, cmComputeLinkInformation*> LinkInformation;
|
||||
|
||||
cmComputeLinkInformation* GetLinkInformation(const char* config);
|
||||
|
||||
@@ -533,11 +533,10 @@ void cmLocalGenerator::GenerateTargetManifest()
|
||||
this->Makefile->GetConfigurations(configNames);
|
||||
|
||||
// Add our targets to the manifest for each configuration.
|
||||
cmGeneratorTargetsType targets = this->Makefile->GetGeneratorTargets();
|
||||
for(cmGeneratorTargetsType::iterator t = targets.begin();
|
||||
t != targets.end(); ++t)
|
||||
cmTargets& targets = this->Makefile->GetTargets();
|
||||
for(cmTargets::iterator t = targets.begin(); t != targets.end(); ++t)
|
||||
{
|
||||
cmGeneratorTarget& target = *t->second;
|
||||
cmTarget& target = t->second;
|
||||
if(configNames.empty())
|
||||
{
|
||||
target.GenerateTargetManifest(0);
|
||||
|
||||
@@ -3494,6 +3494,76 @@ bool cmTarget::GetImplibGNUtoMS(std::string const& gnuName,
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GenerateTargetManifest(const char* config)
|
||||
{
|
||||
cmMakefile* mf = this->Makefile;
|
||||
cmLocalGenerator* lg = mf->GetLocalGenerator();
|
||||
cmGlobalGenerator* gg = lg->GetGlobalGenerator();
|
||||
|
||||
// Get the names.
|
||||
std::string name;
|
||||
std::string soName;
|
||||
std::string realName;
|
||||
std::string impName;
|
||||
std::string pdbName;
|
||||
if(this->GetType() == cmTarget::EXECUTABLE)
|
||||
{
|
||||
this->GetExecutableNames(name, realName, impName, pdbName, config);
|
||||
}
|
||||
else if(this->GetType() == cmTarget::STATIC_LIBRARY ||
|
||||
this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||
this->GetType() == cmTarget::MODULE_LIBRARY)
|
||||
{
|
||||
this->GetLibraryNames(name, soName, realName, impName, pdbName, config);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Get the directory.
|
||||
std::string dir = this->GetDirectory(config, false);
|
||||
|
||||
// Add each name.
|
||||
std::string f;
|
||||
if(!name.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += name;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!soName.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += soName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!realName.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += realName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!pdbName.empty())
|
||||
{
|
||||
f = dir;
|
||||
f += "/";
|
||||
f += pdbName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
if(!impName.empty())
|
||||
{
|
||||
f = this->GetDirectory(config, true);
|
||||
f += "/";
|
||||
f += impName;
|
||||
gg->AddToManifest(config? config:"", f);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::SetPropertyDefault(const char* property,
|
||||
const char* default_value)
|
||||
|
||||
@@ -367,6 +367,9 @@ public:
|
||||
bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out,
|
||||
const char* newExt = 0);
|
||||
|
||||
/** Add the target output files to the global generator manifest. */
|
||||
void GenerateTargetManifest(const char* config);
|
||||
|
||||
/**
|
||||
* Compute whether this target must be relinked before installing.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user