ENH: allow sub projects to use targets that are not part of the sub-project
This commit is contained in:
parent
1e6989017d
commit
69da19a6a7
|
@ -753,6 +753,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
|
||||||
// if the depend is a target then make
|
// if the depend is a target then make
|
||||||
// the target with the source that is a custom command
|
// the target with the source that is a custom command
|
||||||
// depend on the that target via a AddUtility call
|
// depend on the that target via a AddUtility call
|
||||||
|
std::cerr << "AddUtility " << target.GetName() << " " << *d << "\n";
|
||||||
target.AddUtility(d->c_str());
|
target.AddUtility(d->c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1265,17 +1266,10 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
|
||||||
{
|
{
|
||||||
cmTarget* t = this->FindTarget(m_CurrentProject.c_str(),
|
cmTarget* t = this->FindTarget(m_CurrentProject.c_str(),
|
||||||
i->c_str());
|
i->c_str());
|
||||||
if(!t)
|
// if the target is in this project then make target depend
|
||||||
{
|
// on it. It may not be in this project if this is a sub
|
||||||
std::string m = "Error Utility: ";
|
// project from the top.
|
||||||
m += *i;
|
if(t)
|
||||||
m += " not found in project ";
|
|
||||||
m += m_CurrentProject.c_str();
|
|
||||||
m += " it is a utility of ";
|
|
||||||
m += cmtarget->GetName();
|
|
||||||
cmSystemTools::Error(m.c_str());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
cmXCodeObject* dptarget = this->FindXCodeTarget(t);
|
cmXCodeObject* dptarget = this->FindXCodeTarget(t);
|
||||||
if(dptarget)
|
if(dptarget)
|
||||||
|
|
Loading…
Reference in New Issue