summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx39
1 files changed, 17 insertions, 22 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index d5d78d5..6b2d461 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -36,7 +36,7 @@ void reportError(cmGeneratorExpressionContext *context,
return;
}
- cmOStringStream e;
+ std::ostringstream e;
e << "Error evaluating generator expression:\n"
<< " " << expr << "\n"
<< result;
@@ -362,7 +362,7 @@ static const struct MakeCIdentifierNode : public cmGeneratorExpressionNode
const GeneratorExpressionContent *,
cmGeneratorExpressionDAGChecker *) const
{
- return cmSystemTools::MakeCidentifier(parameters.front().c_str());
+ return cmSystemTools::MakeCidentifier(parameters.front());
}
} makeCIdentifierNode;
@@ -456,7 +456,7 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
{
case cmPolicies::WARN:
{
- cmOStringStream e;
+ std::ostringstream e;
e << context->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0044);
context->Makefile->GetCMakeInstance()
@@ -803,18 +803,9 @@ static const struct JoinNode : public cmGeneratorExpressionNode
const GeneratorExpressionContent *,
cmGeneratorExpressionDAGChecker *) const
{
- std::string result;
-
std::vector<std::string> list;
cmSystemTools::ExpandListArgument(parameters.front(), list);
- std::string sep;
- for(std::vector<std::string>::const_iterator li = list.begin();
- li != list.end(); ++li)
- {
- result += sep + *li;
- sep = parameters[1];
- }
- return result;
+ return cmJoin(list, parameters[1]);
}
} joinNode;
@@ -953,14 +944,14 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
if (!target)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Target \""
<< targetName
<< "\" not found.";
reportError(context, content->GetOriginalExpression(), e.str());
return std::string();
}
- context->AllTargets.insert(target);
+ context->AllTargets.insert(target);
}
if (target == context->HeadTarget)
@@ -971,6 +962,10 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
// value for all evaluations.
context->SeenTargetProperties.insert(propertyName);
}
+ if (propertyName == "SOURCES")
+ {
+ context->SourceSensitiveTargets.insert(target);
+ }
if (propertyName.empty())
{
@@ -1249,7 +1244,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
{
if (!context->EvaluateForBuildsystem)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "The evaluation of the TARGET_OBJECTS generator expression "
"is only suitable for consumption by CMake. It is not suitable "
"for writing out elsewhere.";
@@ -1259,10 +1254,10 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
std::string tgtName = parameters.front();
cmGeneratorTarget* gt =
- context->Makefile->FindGeneratorTargetToUse(tgtName.c_str());
+ context->Makefile->FindGeneratorTargetToUse(tgtName);
if (!gt)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Objects of target \"" << tgtName
<< "\" referenced but no such target exists.";
reportError(context, content->GetOriginalExpression(), e.str());
@@ -1270,7 +1265,7 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
}
if (gt->GetType() != cmTarget::OBJECT_LIBRARY)
{
- cmOStringStream e;
+ std::ostringstream e;
e << "Objects of target \"" << tgtName
<< "\" referenced but is not an OBJECT library.";
reportError(context, content->GetOriginalExpression(), e.str());
@@ -1432,7 +1427,7 @@ cmPolicies::PolicyStatus statusForTarget(cmTarget const* tgt,
#undef RETURN_POLICY
- assert("!Unreachable code. Not a valid policy");
+ assert(0 && "Unreachable code. Not a valid policy");
return cmPolicies::WARN;
}
@@ -1448,7 +1443,7 @@ cmPolicies::PolicyID policyForString(const char *policy_id)
#undef RETURN_POLICY_ID
- assert("!Unreachable code. Not a valid policy");
+ assert(0 && "Unreachable code. Not a valid policy");
return cmPolicies::CMP0002;
}
@@ -2031,7 +2026,7 @@ std::string GeneratorExpressionContent::EvaluateParameters(
}
else
{
- cmOStringStream e;
+ std::ostringstream e;
e << "$<" + identifier + "> expression requires "
<< numExpected
<< " comma separated parameters, but got "