| 27 | namespace { |
| 28 | |
| 29 | std::string IndentText(std::string text, cmMakefile& mf) |
| 30 | { |
| 31 | auto indent = |
| 32 | cmList{ mf.GetSafeDefinition("CMAKE_MESSAGE_INDENT") }.join(""); |
| 33 | |
| 34 | auto const showContext = mf.GetCMakeInstance()->GetShowLogContext() || |
| 35 | mf.IsOn("CMAKE_MESSAGE_CONTEXT_SHOW"); |
| 36 | if (showContext) { |
| 37 | auto context = |
| 38 | cmList{ mf.GetSafeDefinition("CMAKE_MESSAGE_CONTEXT") }.join("."); |
| 39 | if (!context.empty()) { |
| 40 | indent.insert(0u, cmStrCat("["_s, context, "] "_s)); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | if (!indent.empty()) { |
| 45 | cmSystemTools::ReplaceString(text, "\n", "\n" + indent); |
| 46 | text.insert(0u, indent); |
| 47 | } |
| 48 | return text; |
| 49 | } |
| 50 | |
| 51 | void ReportCheckResult(cm::string_view what, std::string result, |
| 52 | cmMakefile& mf) |
no test coverage detected
searching dependent graphs…