Merge topic 'fix-INSTALL-and-PACKAGE-depend-tracing'
8e82773
Remove unused GLOBAL_TARGET generation code0621362
Fix dependency tracing of INSTALL and PACKAGE (#11598)
This commit is contained in:
commit
75844666ac
|
@ -814,22 +814,9 @@ void cmGlobalGenerator::Generate()
|
||||||
// For each existing cmLocalGenerator
|
// For each existing cmLocalGenerator
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
// Consolidate global targets
|
// Put a copy of each global target in every directory.
|
||||||
cmTargets globalTargets;
|
cmTargets globalTargets;
|
||||||
this->CreateDefaultGlobalTargets(&globalTargets);
|
this->CreateDefaultGlobalTargets(&globalTargets);
|
||||||
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
|
||||||
{
|
|
||||||
cmTargets* targets =
|
|
||||||
&(this->LocalGenerators[i]->GetMakefile()->GetTargets());
|
|
||||||
cmTargets::iterator tarIt;
|
|
||||||
for ( tarIt = targets->begin(); tarIt != targets->end(); ++ tarIt )
|
|
||||||
{
|
|
||||||
if ( tarIt->second.GetType() == cmTarget::GLOBAL_TARGET )
|
|
||||||
{
|
|
||||||
globalTargets[tarIt->first] = tarIt->second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
for (i = 0; i < this->LocalGenerators.size(); ++i)
|
||||||
{
|
{
|
||||||
cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
|
cmMakefile* mf = this->LocalGenerators[i]->GetMakefile();
|
||||||
|
@ -1881,8 +1868,7 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
|
||||||
const char* name, const char* message,
|
const char* name, const char* message,
|
||||||
const cmCustomCommandLines* commandLines,
|
const cmCustomCommandLines* commandLines,
|
||||||
std::vector<std::string> depends,
|
std::vector<std::string> depends,
|
||||||
const char* workingDirectory,
|
const char* workingDirectory)
|
||||||
bool depends_on_all /* = false */)
|
|
||||||
{
|
{
|
||||||
// Package
|
// Package
|
||||||
cmTarget target;
|
cmTarget target;
|
||||||
|
@ -1897,10 +1883,6 @@ cmTarget cmGlobalGenerator::CreateGlobalTarget(
|
||||||
workingDirectory);
|
workingDirectory);
|
||||||
target.GetPostBuildCommands().push_back(cc);
|
target.GetPostBuildCommands().push_back(cc);
|
||||||
target.SetProperty("EchoString", message);
|
target.SetProperty("EchoString", message);
|
||||||
if ( depends_on_all )
|
|
||||||
{
|
|
||||||
target.AddUtility("all");
|
|
||||||
}
|
|
||||||
std::vector<std::string>::iterator dit;
|
std::vector<std::string>::iterator dit;
|
||||||
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
|
for ( dit = depends.begin(); dit != depends.end(); ++ dit )
|
||||||
{
|
{
|
||||||
|
|
|
@ -291,8 +291,7 @@ protected:
|
||||||
void CreateDefaultGlobalTargets(cmTargets* targets);
|
void CreateDefaultGlobalTargets(cmTargets* targets);
|
||||||
cmTarget CreateGlobalTarget(const char* name, const char* message,
|
cmTarget CreateGlobalTarget(const char* name, const char* message,
|
||||||
const cmCustomCommandLines* commandLines,
|
const cmCustomCommandLines* commandLines,
|
||||||
std::vector<std::string> depends, const char* workingDir,
|
std::vector<std::string> depends, const char* workingDir);
|
||||||
bool depends_on_all = false);
|
|
||||||
|
|
||||||
bool NeedSymbolicMark;
|
bool NeedSymbolicMark;
|
||||||
bool UseLinkScript;
|
bool UseLinkScript;
|
||||||
|
|
|
@ -3590,6 +3590,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name)
|
||||||
return imported->second;
|
return imported->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Look for a target built in this directory.
|
||||||
|
if(cmTarget* t = this->FindTarget(name))
|
||||||
|
{
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
// Look for a target built in this project.
|
// Look for a target built in this project.
|
||||||
return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name);
|
return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue