MCPcopy Create free account
hub / github.com/Kitware/CMake / ParseLinkFeature

Function ParseLinkFeature

Source/cmLinkItem.cxx:78–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76cm::string_view const LL_END = "</LINK_LIBRARY:"_s;
77}
78cm::optional<std::string> ParseLinkFeature(std::string const& item)
79{
80 if (cmHasPrefix(item, LL_BEGIN) && cmHasSuffix(item, '>')) {
81 return item.substr(LL_BEGIN.length(),
82 item.find('>', LL_BEGIN.length()) - LL_BEGIN.length());
83 }
84 if (cmHasPrefix(item, LL_END) && cmHasSuffix(item, '>')) {
85 return cmLinkItem::DEFAULT;
86 }
87 return cm::nullopt;
88}

Callers 3

ExpandLinkItemsMethod · 0.85

Calls 5

cmHasPrefixFunction · 0.85
cmHasSuffixFunction · 0.85
lengthMethod · 0.80
substrMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…