diff options
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 49fc96b..a86c2bc 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -990,6 +990,9 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode assert(target); + cmGeneratorTarget* gtgt = + context->Makefile->GetGlobalGenerator()->GetGeneratorTarget(target); + if (propertyName == "LINKER_LANGUAGE") { if (target->LinkLanguagePropagatesToDependents() && @@ -1001,7 +1004,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode "link libraries for a static library"); return std::string(); } - return target->GetLinkerLanguage(context->Config); + return gtgt->GetLinkerLanguage(context->Config); } cmGeneratorExpressionDAGChecker dagChecker(context->Backtrace, @@ -1128,9 +1131,6 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode } } - cmGeneratorTarget* gtgt = - context->Makefile->GetGlobalGenerator()->GetGeneratorTarget(target); - if (!prop) { if (target->IsImported() @@ -1600,7 +1600,7 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag> cmGeneratorExpressionContext *context, const GeneratorExpressionContent *content) { - std::string language = target->Target->GetLinkerLanguage(context->Config); + std::string language = target->GetLinkerLanguage(context->Config); std::string pdbSupportVar = "CMAKE_" + language + "_LINKER_SUPPORTS_PDB"; |