|
|
@@ -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"
|