cmGeneratorTarget: Move GetAutoUicOptions from cmTarget.

This commit is contained in:
Stephen Kelly 2015-08-04 19:19:41 +02:00
parent 41abdc17df
commit 12bc571c13
5 changed files with 33 additions and 29 deletions

View File

@ -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
{

View File

@ -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;

View File

@ -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, ";");
}

View File

@ -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,

View File

@ -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;