diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-03-04 03:35:06 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-03-04 03:35:06 (GMT) |
commit | a9a0c91630401a84bbbc48c07e9a9e3cd7d81761 (patch) | |
tree | 11aa6472ee2349b94151e29671325ada15dca238 /Source/cmGlobalGenerator.cxx | |
parent | ed1afcdaee356c0e353f00c27a57014dc59023ab (diff) | |
download | CMake-a9a0c91630401a84bbbc48c07e9a9e3cd7d81761.zip CMake-a9a0c91630401a84bbbc48c07e9a9e3cd7d81761.tar.gz CMake-a9a0c91630401a84bbbc48c07e9a9e3cd7d81761.tar.bz2 |
ENH: fix for finding the correct target in the current project
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 0d66113..66b54ca 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -873,11 +873,17 @@ void cmGlobalGenerator::FillProjectMap() } -cmTarget* cmGlobalGenerator::FindTarget(const char* name) +cmTarget* cmGlobalGenerator::FindTarget(const char* project, + const char* name) { - for(unsigned int i = 0; i < m_LocalGenerators.size(); ++i) + std::vector<cmLocalGenerator*>* gens = &m_LocalGenerators; + if(project) { - cmTarget* ret = m_LocalGenerators[i]->GetMakefile()->FindTarget(name); + gens = &m_ProjectMap[project]; + } + for(unsigned int i = 0; i < gens->size(); ++i) + { + cmTarget* ret = (*gens)[i]->GetMakefile()->FindTarget(name); if(ret) { return ret; |