diff options
author | Brad King <brad.king@kitware.com> | 2021-07-20 18:50:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-20 18:52:01 (GMT) |
commit | 83c82722808eb3f6c38b9069c95960378446afbb (patch) | |
tree | 081321e2238157e3c3a579f697006c85b7e3acbc /Source/cmGeneratorExpressionNode.cxx | |
parent | 31ecd3718047874b5eeb939e9608fa1bd386c1a7 (diff) | |
download | CMake-83c82722808eb3f6c38b9069c95960378446afbb.zip CMake-83c82722808eb3f6c38b9069c95960378446afbb.tar.gz CMake-83c82722808eb3f6c38b9069c95960378446afbb.tar.bz2 |
cmGeneratorExpressionNode: Factor out local variable for global generator
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index c608bf9..6ace49d 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -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" |