Browse Source

Add more forwarding API to cmGeneratorTarget.

This API is the most commonly required in the following patches.
Stephen Kelly 13 years ago
parent
commit
f428ca25f5
2 changed files with 36 additions and 0 deletions
  1. 30 0
      Source/cmGeneratorTarget.cxx
  2. 6 0
      Source/cmGeneratorTarget.h

+ 30 - 0
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<cmSourceFile*> const& cmGeneratorTarget::GetSourceFiles()
+{
+  return this->Target->GetSourceFiles();
+}
+
 //----------------------------------------------------------------------------
 void cmGeneratorTarget::ClassifySources()
 {

+ 6 - 0
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<cmSourceFile*> const& GetSourceFiles();
+
   cmTarget* Target;
   cmMakefile* Makefile;
   cmLocalGenerator* LocalGenerator;