summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index b59298f..d0b6190 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -790,11 +790,12 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode
if (propertyName == "LINKER_LANGUAGE")
{
- if (dagCheckerParent && dagCheckerParent->EvaluatingLinkLibraries())
+ if (target->LinkLanguagePropagatesToDependents() &&
+ dagCheckerParent && dagCheckerParent->EvaluatingLinkLibraries())
{
reportError(context, content->GetOriginalExpression(),
"LINKER_LANGUAGE target property can not be used while evaluating "
- "link libraries");
+ "link libraries for a static library");
return std::string();
}
const char *lang = target->GetLinkerLanguage(context->Config);