Browse Source

cmGeneratorTarget: Move GetAutoUicOptions from cmTarget.

Stephen Kelly 10 years ago
parent
commit
12bc571c13
5 changed files with 33 additions and 29 deletions
  1. 26 0
      Source/cmGeneratorTarget.cxx
  2. 3 1
      Source/cmGeneratorTarget.h
  3. 4 1
      Source/cmQtAutoGenerators.cxx
  4. 0 25
      Source/cmTarget.cxx
  5. 0 2
      Source/cmTarget.h

+ 26 - 0
Source/cmGeneratorTarget.cxx

@@ -742,6 +742,32 @@ cmGeneratorTarget::UseObjectLibraries(std::vector<std::string>& objs,
     }
 }
 
+//----------------------------------------------------------------------------
+void cmGeneratorTarget::GetAutoUicOptions(std::vector<std::string> &result,
+                                 const std::string& config) const
+{
+  const char *prop
+            = this->Target->
+                    GetLinkInterfaceDependentStringProperty("AUTOUIC_OPTIONS",
+                                                            config);
+  if (!prop)
+    {
+    return;
+    }
+  cmGeneratorExpression ge;
+
+  cmGeneratorExpressionDAGChecker dagChecker(
+                                      this->GetName(),
+                                      "AUTOUIC_OPTIONS", 0, 0);
+  cmSystemTools::ExpandListArgument(ge.Parse(prop)
+                                      ->Evaluate(this->Makefile,
+                                                config,
+                                                false,
+                                                this->Target,
+                                                &dagChecker),
+                                  result);
+}
+
 //----------------------------------------------------------------------------
 class cmTargetTraceDependencies
 {

+ 3 - 1
Source/cmGeneratorTarget.h

@@ -156,6 +156,9 @@ public:
     SourceFileType Type;
     const char* MacFolder; // location inside Mac content folders
   };
+  void GetAutoUicOptions(std::vector<std::string> &result,
+                         const std::string& config) const;
+
 
   struct SourceFileFlags
   GetTargetSourceFileFlags(const cmSourceFile* sf) const;
@@ -176,7 +179,6 @@ private:
   struct SourceEntry { std::vector<cmSourceFile*> Depends; };
   typedef std::map<cmSourceFile const*, SourceEntry> SourceEntriesType;
   SourceEntriesType SourceEntries;
-
   mutable std::map<cmSourceFile const*, std::string> Objects;
   std::set<cmSourceFile const*> ExplicitObjectName;
   mutable std::map<std::string, std::vector<std::string> > SystemIncludesCache;

+ 4 - 1
Source/cmQtAutoGenerators.cxx

@@ -878,8 +878,11 @@ void cmQtAutoGenerators::MergeUicOptions(std::vector<std::string> &opts,
 static void GetUicOpts(cmTarget const* target, const std::string& config,
                        std::string &optString)
 {
+  cmGeneratorTarget *gtgt = target->GetMakefile()
+                                  ->GetGlobalGenerator()
+                                  ->GetGeneratorTarget(target);
   std::vector<std::string> opts;
-  target->GetAutoUicOptions(opts, config);
+  gtgt->GetAutoUicOptions(opts, config);
   optString = cmJoin(opts, ";");
 }
 

+ 0 - 25
Source/cmTarget.cxx

@@ -2235,31 +2235,6 @@ static void processCompileOptions(cmTarget const* tgt,
                                 language);
 }
 
-//----------------------------------------------------------------------------
-void cmTarget::GetAutoUicOptions(std::vector<std::string> &result,
-                                 const std::string& config) const
-{
-  const char *prop
-            = this->GetLinkInterfaceDependentStringProperty("AUTOUIC_OPTIONS",
-                                                            config);
-  if (!prop)
-    {
-    return;
-    }
-  cmGeneratorExpression ge;
-
-  cmGeneratorExpressionDAGChecker dagChecker(
-                                      this->GetName(),
-                                      "AUTOUIC_OPTIONS", 0, 0);
-  cmSystemTools::ExpandListArgument(ge.Parse(prop)
-                                      ->Evaluate(this->Makefile,
-                                                config,
-                                                false,
-                                                this,
-                                                &dagChecker),
-                                  result);
-}
-
 //----------------------------------------------------------------------------
 void cmTarget::GetCompileOptions(std::vector<std::string> &result,
                                  const std::string& config,

+ 0 - 2
Source/cmTarget.h

@@ -571,8 +571,6 @@ public:
   void GetCompileOptions(std::vector<std::string> &result,
                          const std::string& config,
                          const std::string& language) const;
-  void GetAutoUicOptions(std::vector<std::string> &result,
-                         const std::string& config) const;
   void GetCompileFeatures(std::vector<std::string> &features,
                           const std::string& config) const;