mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 12:18:36 -06:00
cmGeneratorExpressionNode: Factor out local variable for global generator
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user