From f428ca25f5f983cb57eb009a330c09506ee81587 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Mon, 17 Sep 2012 12:02:24 +0200 Subject: [PATCH] Add more forwarding API to cmGeneratorTarget. This API is the most commonly required in the following patches. --- Source/cmGeneratorTarget.cxx | 30 ++++++++++++++++++++++++++++++ Source/cmGeneratorTarget.h | 6 ++++++ 2 files changed, 36 insertions(+) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 6e2e23da5..e0272fb21 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -27,6 +27,36 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t) this->LookupObjectLibraries(); } +//---------------------------------------------------------------------------- +int cmGeneratorTarget::GetType() const +{ + return this->Target->GetType(); +} + +//---------------------------------------------------------------------------- +const char *cmGeneratorTarget::GetName() const +{ + return this->Target->GetName(); +} + +//---------------------------------------------------------------------------- +const char *cmGeneratorTarget::GetProperty(const char *prop) +{ + return this->Target->GetProperty(prop); +} + +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::GetPropertyAsBool(const char *prop) +{ + return this->Target->GetPropertyAsBool(prop); +} + +//---------------------------------------------------------------------------- +std::vector const& cmGeneratorTarget::GetSourceFiles() +{ + return this->Target->GetSourceFiles(); +} + //---------------------------------------------------------------------------- void cmGeneratorTarget::ClassifySources() { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 5c7578d94..bf0ab84bf 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -26,6 +26,12 @@ class cmGeneratorTarget public: cmGeneratorTarget(cmTarget*); + int GetType() const; + const char *GetName() const; + const char *GetProperty(const char *prop); + bool GetPropertyAsBool(const char *prop); + std::vector const& GetSourceFiles(); + cmTarget* Target; cmMakefile* Makefile; cmLocalGenerator* LocalGenerator;