diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-02-08 19:20:53 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-02-08 20:44:11 (GMT) |
commit | 9712362b4580fb92394ecf8ff57be186571f4319 (patch) | |
tree | b043d6b3e90e5026b9bb7afdd8b03f79971a523c /Source | |
parent | faa927e273e04b9aadc13fb1f2b8b307b7383cd2 (diff) | |
download | CMake-9712362b4580fb92394ecf8ff57be186571f4319.zip CMake-9712362b4580fb92394ecf8ff57be186571f4319.tar.gz CMake-9712362b4580fb92394ecf8ff57be186571f4319.tar.bz2 |
Don't allow utility or global targets in the LINKED expression.
The LINKED expression is exclusively for handling INTERFACE content
and it does not make sense for utility targets to have INTERFACE
content.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorExpressionEvaluator.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx index d2dbf11..98e0ada 100644 --- a/Source/cmGeneratorExpressionEvaluator.cxx +++ b/Source/cmGeneratorExpressionEvaluator.cxx @@ -702,6 +702,14 @@ private: { return std::string(); } + if(target->GetType() >= cmTarget::UTILITY && + target->GetType() != cmTarget::UNKNOWN_LIBRARY) + { + ::reportError(context, content->GetOriginalExpression(), + "Target \"" + item + + "\" is not an executable or library."); + return std::string(); + } std::string propertyName = "INTERFACE_" + prop; const char *propContent = target->GetProperty(propertyName.c_str()); if (!propContent) |