cmGlobalGenerator: Make NameResolvesToFramework const.
This commit is contained in:
parent
37554acf43
commit
1c2752169c
|
@ -1989,15 +1989,16 @@ bool cmGlobalGenerator::IsAlias(const char *name) const
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmTarget*
|
cmTarget*
|
||||||
cmGlobalGenerator::FindTarget(const char* project, const char* name,
|
cmGlobalGenerator::FindTarget(const char* project, const char* name,
|
||||||
bool excludeAliases)
|
bool excludeAliases) const
|
||||||
{
|
{
|
||||||
// if project specific
|
// if project specific
|
||||||
if(project)
|
if(project)
|
||||||
{
|
{
|
||||||
std::vector<cmLocalGenerator*>* gens = &this->ProjectMap[project];
|
std::map<cmStdString, std::vector<cmLocalGenerator*> >::const_iterator
|
||||||
for(unsigned int i = 0; i < gens->size(); ++i)
|
gens = this->ProjectMap.find(project);
|
||||||
|
for(unsigned int i = 0; i < gens->second.size(); ++i)
|
||||||
{
|
{
|
||||||
cmTarget* ret = (*gens)[i]->GetMakefile()->FindTarget(name,
|
cmTarget* ret = (gens->second)[i]->GetMakefile()->FindTarget(name,
|
||||||
excludeAliases);
|
excludeAliases);
|
||||||
if(ret)
|
if(ret)
|
||||||
{
|
{
|
||||||
|
@ -2010,14 +2011,14 @@ cmGlobalGenerator::FindTarget(const char* project, const char* name,
|
||||||
{
|
{
|
||||||
if (!excludeAliases)
|
if (!excludeAliases)
|
||||||
{
|
{
|
||||||
std::map<cmStdString, cmTarget*>::iterator ai
|
std::map<cmStdString, cmTarget*>::const_iterator ai
|
||||||
= this->AliasTargets.find(name);
|
= this->AliasTargets.find(name);
|
||||||
if (ai != this->AliasTargets.end())
|
if (ai != this->AliasTargets.end())
|
||||||
{
|
{
|
||||||
return ai->second;
|
return ai->second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::map<cmStdString,cmTarget *>::iterator i =
|
std::map<cmStdString,cmTarget *>::const_iterator i =
|
||||||
this->TotalTargets.find ( name );
|
this->TotalTargets.find ( name );
|
||||||
if ( i != this->TotalTargets.end() )
|
if ( i != this->TotalTargets.end() )
|
||||||
{
|
{
|
||||||
|
@ -2033,7 +2034,8 @@ cmGlobalGenerator::FindTarget(const char* project, const char* name,
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
bool cmGlobalGenerator::NameResolvesToFramework(const std::string& libname)
|
bool
|
||||||
|
cmGlobalGenerator::NameResolvesToFramework(const std::string& libname) const
|
||||||
{
|
{
|
||||||
if(cmSystemTools::IsPathToFramework(libname.c_str()))
|
if(cmSystemTools::IsPathToFramework(libname.c_str()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -207,14 +207,14 @@ public:
|
||||||
|
|
||||||
///! Find a target by name by searching the local generators.
|
///! Find a target by name by searching the local generators.
|
||||||
cmTarget* FindTarget(const char* project, const char* name,
|
cmTarget* FindTarget(const char* project, const char* name,
|
||||||
bool excludeAliases = false);
|
bool excludeAliases = false) const;
|
||||||
|
|
||||||
void AddAlias(const char *name, cmTarget *tgt);
|
void AddAlias(const char *name, cmTarget *tgt);
|
||||||
bool IsAlias(const char *name) const;
|
bool IsAlias(const char *name) const;
|
||||||
|
|
||||||
/** Determine if a name resolves to a framework on disk or a built target
|
/** Determine if a name resolves to a framework on disk or a built target
|
||||||
that is a framework. */
|
that is a framework. */
|
||||||
bool NameResolvesToFramework(const std::string& libname);
|
bool NameResolvesToFramework(const std::string& libname) const;
|
||||||
|
|
||||||
/** If check to see if the target is linked to by any other
|
/** If check to see if the target is linked to by any other
|
||||||
target in the project */
|
target in the project */
|
||||||
|
|
Loading…
Reference in New Issue