summaryrefslogtreecommitdiff
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-25 09:12:28 +0200
committerStephen Kelly <steveire@gmail.com>2013-07-26 16:58:25 +0200
commitb8dc7fad23a0b6867dae30e3cd6a23c82d6cfac9 (patch)
tree2e1bf0429e6c4413eddbfe064f97bf6b67ef3ce5 /Source/cmGeneratorExpressionEvaluator.cxx
parentc8a10ba9ad8707cfb892ca812efa2f6899adf60b (diff)
downloadcmake-b8dc7fad23a0b6867dae30e3cd6a23c82d6cfac9.tar.gz
Genex: Disallow LINKER_LANGUAGE only when used on a static library.
For shared libraries and executables, the linker_language is indepenedent of the linked libraries.
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 b59298feef..d0b61909a1 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);