From 12bc571c13eda8d504eac788d6b3e5e8d83e3ad3 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 4 Aug 2015 19:19:41 +0200 Subject: [PATCH] cmGeneratorTarget: Move GetAutoUicOptions from cmTarget. --- Source/cmGeneratorTarget.cxx | 26 ++++++++++++++++++++++++++ Source/cmGeneratorTarget.h | 4 +++- Source/cmQtAutoGenerators.cxx | 5 ++++- Source/cmTarget.cxx | 25 ------------------------- Source/cmTarget.h | 2 -- 5 files changed, 33 insertions(+), 29 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index e17df9e1b..95f6aaaa2 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -742,6 +742,32 @@ cmGeneratorTarget::UseObjectLibraries(std::vector& objs, } } +//---------------------------------------------------------------------------- +void cmGeneratorTarget::GetAutoUicOptions(std::vector &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 { diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 8e5c2ab8c..3e43711eb 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -156,6 +156,9 @@ public: SourceFileType Type; const char* MacFolder; // location inside Mac content folders }; + void GetAutoUicOptions(std::vector &result, + const std::string& config) const; + struct SourceFileFlags GetTargetSourceFileFlags(const cmSourceFile* sf) const; @@ -176,7 +179,6 @@ private: struct SourceEntry { std::vector Depends; }; typedef std::map SourceEntriesType; SourceEntriesType SourceEntries; - mutable std::map Objects; std::set ExplicitObjectName; mutable std::map > SystemIncludesCache; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 1322dea08..a72b176cb 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -878,8 +878,11 @@ void cmQtAutoGenerators::MergeUicOptions(std::vector &opts, static void GetUicOpts(cmTarget const* target, const std::string& config, std::string &optString) { + cmGeneratorTarget *gtgt = target->GetMakefile() + ->GetGlobalGenerator() + ->GetGeneratorTarget(target); std::vector opts; - target->GetAutoUicOptions(opts, config); + gtgt->GetAutoUicOptions(opts, config); optString = cmJoin(opts, ";"); } diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 54f9cf044..3074f9b01 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2235,31 +2235,6 @@ static void processCompileOptions(cmTarget const* tgt, language); } -//---------------------------------------------------------------------------- -void cmTarget::GetAutoUicOptions(std::vector &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 &result, const std::string& config, diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 389f9cdd8..d5374a68d 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -571,8 +571,6 @@ public: void GetCompileOptions(std::vector &result, const std::string& config, const std::string& language) const; - void GetAutoUicOptions(std::vector &result, - const std::string& config) const; void GetCompileFeatures(std::vector &features, const std::string& config) const;