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

Function CheckLinkLibraryPattern

Source/cmTarget.cxx:2394–2423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2392
2393namespace {
2394bool CheckLinkLibraryPattern(UsageRequirementProperty const& usage,
2395 cmake* context)
2396{
2397 // Look for <LINK_LIBRARY:> and </LINK_LIBRARY:> internal tags
2398 static cmsys::RegularExpression linkPattern(
2399 "(^|;)(</?LINK_(LIBRARY|GROUP):[^;>]*>)(;|$)");
2400
2401 bool isValid = true;
2402
2403 for (auto const& item : usage.Entries) {
2404 if (!linkPattern.find(item.Value)) {
2405 continue;
2406 }
2407
2408 isValid = false;
2409
2410 // Report an error.
2411 context->IssueMessage(
2412 MessageType::FATAL_ERROR,
2413 cmStrCat(
2414 "Property ", usage.Name, " contains the invalid item \"",
2415 linkPattern.match(2), "\". The ", usage.Name,
2416 " property may contain the generator-expression \"$<LINK_",
2417 linkPattern.match(3),
2418 ":...>\" which may be used to specify how the libraries are linked."),
2419 item.Backtrace);
2420 }
2421
2422 return isValid;
2423}
2424}
2425
2426void cmTarget::FinalizeTargetConfiguration(cmBTStringRange compileDefinitions)

Callers 1

Calls 4

cmStrCatFunction · 0.70
findMethod · 0.45
IssueMessageMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…