summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-02-08 16:39:22 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-08 18:05:34 (GMT)
commit8d60da0cb56b44815f02ece01e224e1f4eba6c80 (patch)
tree0005425533e1ee87ef7decefafd40fa7921ded14 /Source/cmGlobalGenerator.cxx
parent23e9b80f585db1cc68846a54e6e5844f970215ea (diff)
downloadCMake-8d60da0cb56b44815f02ece01e224e1f4eba6c80.zip
CMake-8d60da0cb56b44815f02ece01e224e1f4eba6c80.tar.gz
CMake-8d60da0cb56b44815f02ece01e224e1f4eba6c80.tar.bz2
cmTarget: Remove the project argument to FindTarget
All callers passed 0 in, so just remove the branch.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx51
1 files changed, 16 insertions, 35 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index ae9c731..ba4cce8 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2070,47 +2070,28 @@ bool cmGlobalGenerator::IsAlias(const std::string& name) const
//----------------------------------------------------------------------------
cmTarget*
-cmGlobalGenerator::FindTarget(const char* project, const std::string& name,
+cmGlobalGenerator::FindTarget(const std::string& name,
bool excludeAliases) const
{
- // if project specific
- if(project)
+ if (!excludeAliases)
{
- std::map<cmStdString, std::vector<cmLocalGenerator*> >::const_iterator
- gens = this->ProjectMap.find(project);
- for(unsigned int i = 0; i < gens->second.size(); ++i)
+ std::map<cmStdString, cmTarget*>::const_iterator ai
+ = this->AliasTargets.find(name);
+ if (ai != this->AliasTargets.end())
{
- cmTarget* ret = (gens->second)[i]->GetMakefile()->FindTarget(name,
- excludeAliases);
- if(ret)
- {
- return ret;
- }
+ return ai->second;
}
}
- // if all projects/directories
- else
+ std::map<cmStdString,cmTarget *>::const_iterator i =
+ this->TotalTargets.find ( name );
+ if ( i != this->TotalTargets.end() )
{
- if (!excludeAliases)
- {
- std::map<cmStdString, cmTarget*>::const_iterator ai
- = this->AliasTargets.find(name);
- if (ai != this->AliasTargets.end())
- {
- return ai->second;
- }
- }
- std::map<cmStdString,cmTarget *>::const_iterator i =
- this->TotalTargets.find ( name );
- if ( i != this->TotalTargets.end() )
- {
- return i->second;
- }
- i = this->ImportedTargets.find(name);
- if ( i != this->ImportedTargets.end() )
- {
- return i->second;
- }
+ return i->second;
+ }
+ i = this->ImportedTargets.find(name);
+ if ( i != this->ImportedTargets.end() )
+ {
+ return i->second;
}
return 0;
}
@@ -2124,7 +2105,7 @@ cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const
return true;
}
- if(cmTarget* tgt = this->FindTarget(0, libname.c_str()))
+ if(cmTarget* tgt = this->FindTarget(libname.c_str()))
{
if(tgt->IsFrameworkOnApple())
{