summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalXCodeGenerator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2005-04-06 14:59:25 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2005-04-06 14:59:25 (GMT)
commit69da19a6a7c19dc8b52a510fc083759e4c494415 (patch)
tree3d723ee90fb86b1b741c95007d81c2e8323198ba /Source/cmGlobalXCodeGenerator.cxx
parent1e6989017dc1bcd9bfbc83653bd95549cbf2bd47 (diff)
downloadCMake-69da19a6a7c19dc8b52a510fc083759e4c494415.zip
CMake-69da19a6a7c19dc8b52a510fc083759e4c494415.tar.gz
CMake-69da19a6a7c19dc8b52a510fc083759e4c494415.tar.bz2
ENH: allow sub projects to use targets that are not part of the sub-project
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx16
1 files changed, 5 insertions, 11 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index fdf4980..6848dd1 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -753,6 +753,7 @@ cmGlobalXCodeGenerator::AddCommandsToBuildPhase(cmXCodeObject* buildphase,
// if the depend is a target then make
// the target with the source that is a custom command
// depend on the that target via a AddUtility call
+ std::cerr << "AddUtility " << target.GetName() << " " << *d << "\n";
target.AddUtility(d->c_str());
}
}
@@ -1265,17 +1266,10 @@ void cmGlobalXCodeGenerator::AddDependAndLinkInformation(cmXCodeObject* target)
{
cmTarget* t = this->FindTarget(m_CurrentProject.c_str(),
i->c_str());
- if(!t)
- {
- std::string m = "Error Utility: ";
- m += *i;
- 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
+ // 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
+ // project from the top.
+ if(t)
{
cmXCodeObject* dptarget = this->FindXCodeTarget(t);
if(dptarget)