From 52854583429e4fb8f180d8276a07d8f8226d6427 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 18 Sep 2012 13:38:10 +0200 Subject: Add convenience for getting a cmGeneratorTarget to use. --- Source/cmMakefile.cxx | 6 ++++++ Source/cmMakefile.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9a9c1c8..f067da4 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -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) diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 4e79cea..80a50d6 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -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. -- cgit v0.12