Skip to content
Snippets Groups Projects
Commit 83c82722 authored by Brad King's avatar Brad King
Browse files

cmGeneratorExpressionNode: Factor out local variable for global generator

parent 31ecd371
No related branches found
No related tags found
No related merge requests found
......@@ -1635,10 +1635,11 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode
reportError(context, content->GetOriginalExpression(), e.str());
return std::string();
}
if (!context->EvaluateForBuildsystem) {
cmGlobalGenerator* gg = context->LG->GetGlobalGenerator();
cmGlobalGenerator* gg = context->LG->GetGlobalGenerator();
{
std::string reason;
if (!gg->HasKnownObjectFileLocation(&reason)) {
if (!context->EvaluateForBuildsystem &&
!gg->HasKnownObjectFileLocation(&reason)) {
std::ostringstream e;
e << "The evaluation of the TARGET_OBJECTS generator expression "
"is only suitable for consumption by CMake (limited"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment