Browse Source

cmGeneratorTarget: Return early from ExpandLinkItems with no items

Brad King 3 years ago
parent
commit
216aa14997
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Source/cmGeneratorTarget.cxx

+ 3 - 0
Source/cmGeneratorTarget.cxx

@@ -6666,6 +6666,9 @@ void cmGeneratorTarget::ExpandLinkItems(std::string const& prop,
                                         LinkInterfaceFor interfaceFor,
                                         cmLinkInterface& iface) const
 {
+  if (entries.empty()) {
+    return;
+  }
   // Keep this logic in sync with ComputeLinkImplementationLibraries.
   cmGeneratorExpressionDAGChecker dagChecker(this, prop, nullptr, nullptr);
   // The $<LINK_ONLY> expression may be in a link interface to specify