diff options
author | Brad King <brad.king@kitware.com> | 2019-04-30 14:09:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-30 14:09:52 (GMT) |
commit | d0e6fc28334023a42fbae797ece8c8e8526dc1c3 (patch) | |
tree | abdba82e756e6aa8545b758f8ce908a67f89ad7b /Source/cmGeneratorExpressionNode.cxx | |
parent | 60515b205e0151fa0194a984850e652a04a9a165 (diff) | |
parent | ce078dda79df1c8d9f142e45d2fa3cf971a09594 (diff) | |
download | CMake-d0e6fc28334023a42fbae797ece8c8e8526dc1c3.zip CMake-d0e6fc28334023a42fbae797ece8c8e8526dc1c3.tar.gz CMake-d0e6fc28334023a42fbae797ece8c8e8526dc1c3.tar.bz2 |
Merge topic 'relax_TARGET_OBJECT_generator_expr'
ce078dda79 Relax the usage of TARGET_OBJECTS generator expression
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3178
Diffstat (limited to 'Source/cmGeneratorExpressionNode.cxx')
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 8b3d9d6..8803830 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1600,10 +1600,16 @@ static const struct TargetObjectsNode : public cmGeneratorExpressionNode reportError(context, content->GetOriginalExpression(), e.str()); return std::string(); } - if (gt->GetType() != cmStateEnums::OBJECT_LIBRARY) { + cmStateEnums::TargetType type = gt->GetType(); + if (type != cmStateEnums::EXECUTABLE && + type != cmStateEnums::STATIC_LIBRARY && + type != cmStateEnums::SHARED_LIBRARY && + type != cmStateEnums::MODULE_LIBRARY && + type != cmStateEnums::OBJECT_LIBRARY) { std::ostringstream e; e << "Objects of target \"" << tgtName - << "\" referenced but is not an OBJECT library."; + << "\" referenced but is not an allowed library types (EXECUTABLE, " + << "STATIC, SHARED, MODULE, OBJECT)."; reportError(context, content->GetOriginalExpression(), e.str()); return std::string(); } |