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

Method IsLinkLookupScope

Source/cmGeneratorTarget_Link.cxx:495–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495bool cmGeneratorTarget::IsLinkLookupScope(std::string const& n,
496 cmLocalGenerator const*& lg) const
497{
498 if (cmHasLiteralPrefix(n, CMAKE_DIRECTORY_ID_SEP)) {
499 cmDirectoryId const dirId = n.substr(cmStrLen(CMAKE_DIRECTORY_ID_SEP));
500 if (dirId.String.empty()) {
501 lg = this->LocalGenerator;
502 return true;
503 }
504 if (cmLocalGenerator const* otherLG =
505 this->GlobalGenerator->FindLocalGenerator(dirId)) {
506 lg = otherLG;
507 return true;
508 }
509 }
510 return false;
511}
512
513cm::optional<cmLinkItem> cmGeneratorTarget::LookupLinkItem(
514 std::string const& n, cmListFileBacktrace const& bt,

Calls 5

cmHasLiteralPrefixFunction · 0.85
FindLocalGeneratorMethod · 0.80
cmStrLenFunction · 0.70
substrMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected