diff options
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index 669694c..95227d2 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -1251,6 +1251,16 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode const GeneratorExpressionContent *content, cmGeneratorExpressionDAGChecker *) const { + if (!context->EvaluateForBuildsystem) + { + cmOStringStream 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."; + reportError(context, content->GetOriginalExpression(), e.str()); + return std::string(); + } + std::string tgtName = parameters.front(); cmGeneratorTarget* gt = context->Makefile->FindGeneratorTargetToUse(tgtName.c_str()); |