Add convenience for getting a cmGeneratorTarget to use.

This commit is contained in:
Stephen Kelly 2012-09-18 13:38:10 +02:00
parent c31f3d99f8
commit 5285458342
2 changed files with 7 additions and 0 deletions

View File

@ -3984,6 +3984,12 @@ cmTarget* cmMakefile::FindTargetToUse(const char* name)
return this->LocalGenerator->GetGlobalGenerator()->FindTarget(0, name);
}
cmGeneratorTarget* cmMakefile::FindGeneratorTargetToUse(const char* name)
{
cmTarget *t = this->FindTargetToUse(name);
return this->LocalGenerator->GetGlobalGenerator()->GetGeneratorTarget(t);
}
//----------------------------------------------------------------------------
bool cmMakefile::EnforceUniqueName(std::string const& name, std::string& msg,
bool isCustom)

View File

@ -535,6 +535,7 @@ public:
/** Find a target to use in place of the given name. The target
returned may be imported or built within the project. */
cmTarget* FindTargetToUse(const char* name);
cmGeneratorTarget* FindGeneratorTargetToUse(const char* name);
/**
* Mark include directories as system directories.