summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorExpression.cxx5
-rw-r--r--Source/cmGeneratorExpression.h4
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx3
-rw-r--r--Source/cmTarget.cxx43
-rw-r--r--Source/cmTarget.h7
5 files changed, 15 insertions, 47 deletions
diff --git a/Source/cmGeneratorExpression.cxx b/Source/cmGeneratorExpression.cxx
index 60bf179..5d162fe 100644
--- a/Source/cmGeneratorExpression.cxx
+++ b/Source/cmGeneratorExpression.cxx
@@ -95,14 +95,13 @@ const char *cmCompiledGeneratorExpression::Evaluate(
for ( ; it != end; ++it)
{
- const std::string result = (*it)->Evaluate(&context, dagChecker);
- this->Output += result;
+ this->Output += (*it)->Evaluate(&context, dagChecker);
for(std::set<cmStdString>::const_iterator
p = context.SeenTargetProperties.begin();
p != context.SeenTargetProperties.end(); ++p)
{
- this->SeenTargetProperties[*p] += result + ";";
+ this->SeenTargetProperties.insert(*p);
}
if (context.HadError)
{
diff --git a/Source/cmGeneratorExpression.h b/Source/cmGeneratorExpression.h
index 4eab2dd..489b052 100644
--- a/Source/cmGeneratorExpression.h
+++ b/Source/cmGeneratorExpression.h
@@ -90,7 +90,7 @@ public:
std::set<cmTarget*> const& GetTargets() const
{ return this->Targets; }
- std::map<cmStdString, cmStdString> const& GetSeenTargetProperties() const
+ std::set<cmStdString> const& GetSeenTargetProperties() const
{ return this->SeenTargetProperties; }
~cmCompiledGeneratorExpression();
@@ -124,7 +124,7 @@ private:
bool NeedsParsing;
mutable std::set<cmTarget*> Targets;
- mutable std::map<cmStdString, cmStdString> SeenTargetProperties;
+ mutable std::set<cmStdString> SeenTargetProperties;
mutable std::string Output;
mutable bool HadContextSensitiveCondition;
};
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index f601ea3..d2dbf11 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -398,7 +398,8 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
{
// Keep track of the properties seen while processing.
// The evaluation of the LINK_LIBRARIES generator expressions
- // will check this to ensure that properties form a DAG.
+ // will check this to ensure that properties have one consistent
+ // value for all evaluations.
context->SeenTargetProperties.insert(propertyName);
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 6f197b8..f55999f 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -2233,7 +2233,15 @@ void cmTarget::GetDirectLinkLibraries(const char *config,
&dagChecker),
libs);
- this->AddLinkDependentTargetsForProperties(cge->GetSeenTargetProperties());
+ std::set<cmStdString> seenProps = cge->GetSeenTargetProperties();
+ for (std::set<cmStdString>::const_iterator it = seenProps.begin();
+ it != seenProps.end(); ++it)
+ {
+ if (!this->GetProperty(it->c_str()))
+ {
+ this->LinkImplicitNullProperties.insert(*it);
+ }
+ }
}
}
@@ -4520,18 +4528,6 @@ const char* cmTarget::GetExportMacro()
}
//----------------------------------------------------------------------------
-void cmTarget::GetLinkDependentTargetsForProperty(const std::string &p,
- std::set<std::string> &targets)
-{
- const std::map<cmStdString, std::set<std::string> >::const_iterator findIt
- = this->LinkDependentProperties.find(p);
- if (findIt != this->LinkDependentProperties.end())
- {
- targets = findIt->second;
- }
-}
-
-//----------------------------------------------------------------------------
bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p)
{
return this->LinkImplicitNullProperties.find(p)
@@ -4539,24 +4535,6 @@ bool cmTarget::IsNullImpliedByLinkLibraries(const std::string &p)
}
//----------------------------------------------------------------------------
-void cmTarget::AddLinkDependentTargetsForProperties(
- const std::map<cmStdString, cmStdString> &map)
-{
- for (std::map<cmStdString, cmStdString>::const_iterator it = map.begin();
- it != map.end(); ++it)
- {
- std::vector<std::string> targets;
- cmSystemTools::ExpandListArgument(it->second.c_str(), targets);
- this->LinkDependentProperties[it->first].insert(targets.begin(),
- targets.end());
- if (!this->GetProperty(it->first.c_str()))
- {
- this->LinkImplicitNullProperties.insert(it->first);
- }
- }
-}
-
-//----------------------------------------------------------------------------
template<typename PropertyType>
PropertyType getTypedProperty(cmTarget *tgt, const char *prop,
PropertyType *);
@@ -4611,9 +4589,6 @@ PropertyType checkInterfacePropertyCompatibility(cmTarget *tgt,
const bool explicitlySet = tgt->GetProperties()
.find(p.c_str())
!= tgt->GetProperties().end();
- std::set<std::string> dependentTargets;
- tgt->GetLinkDependentTargetsForProperty(p,
- dependentTargets);
const bool impliedByUse =
tgt->IsNullImpliedByLinkLibraries(p);
assert((impliedByUse ^ explicitlySet)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 7577a59..fb1496f 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -498,17 +498,12 @@ public:
void AppendBuildInterfaceIncludes();
- void GetLinkDependentTargetsForProperty(const std::string &p,
- std::set<std::string> &targets);
bool IsNullImpliedByLinkLibraries(const std::string &p);
bool IsLinkInterfaceDependentBoolProperty(const std::string &p,
const char *config);
bool IsLinkInterfaceDependentStringProperty(const std::string &p,
const char *config);
- void AddLinkDependentTargetsForProperties(
- const std::map<cmStdString, cmStdString> &map);
-
bool GetLinkInterfaceDependentBoolProperty(const std::string &p,
const char *config);
@@ -627,8 +622,6 @@ private:
bool IsApple;
bool IsImportedTarget;
bool DebugIncludesDone;
- mutable std::map<cmStdString, std::set<std::string> >
- LinkDependentProperties;
mutable std::set<std::string> LinkImplicitNullProperties;
bool BuildInterfaceIncludesAppended;