| 2392 | |
| 2393 | namespace { |
| 2394 | bool 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 | |
| 2426 | void cmTarget::FinalizeTargetConfiguration(cmBTStringRange compileDefinitions) |
no test coverage detected
searching dependent graphs…