| 232 | } |
| 233 | |
| 234 | void cmMessenger::PrintBacktraceTitle(std::ostream& out, |
| 235 | cmListFileBacktrace const& bt) const |
| 236 | { |
| 237 | // The title exists only if we have a call on top of the bottom. |
| 238 | if (bt.Empty()) { |
| 239 | return; |
| 240 | } |
| 241 | cmListFileContext lfc = bt.Top(); |
| 242 | if (this->TopSource) { |
| 243 | lfc.FilePath = |
| 244 | cmSystemTools::RelativeIfUnder(*this->TopSource, lfc.FilePath); |
| 245 | } |
| 246 | out << (lfc.Line ? " at " : " in ") << lfc; |
| 247 | } |
| 248 | |
| 249 | void cmMessenger::SetTopSource(cm::optional<std::string> topSource) |
| 250 | { |
no test coverage detected