| 5356 | } |
| 5357 | |
| 5358 | void cmLocalGenerator::UpdateOutputToSourceMap(std::string const& byproduct, |
| 5359 | cmTarget* target, |
| 5360 | cmListFileBacktrace const& bt, |
| 5361 | cmCommandOrigin origin) |
| 5362 | { |
| 5363 | SourceEntry entry; |
| 5364 | entry.Sources.Target = target; |
| 5365 | |
| 5366 | auto pr = this->OutputToSource.emplace(byproduct, entry); |
| 5367 | if (pr.second) { |
| 5368 | CreateGeneratedSource(*this, byproduct, OutputRole::Byproduct, origin, bt); |
| 5369 | } else { |
| 5370 | SourceEntry& current = pr.first->second; |
| 5371 | // Has the target already been set? |
| 5372 | if (!current.Sources.Target) { |
| 5373 | current.Sources.Target = target; |
| 5374 | } else { |
| 5375 | // Multiple custom commands/targets produce the same output (source file |
| 5376 | // or target). See also comment in other UpdateOutputToSourceMap |
| 5377 | // overload. |
| 5378 | // |
| 5379 | // TODO: Warn the user about this case. |
| 5380 | } |
| 5381 | } |
| 5382 | } |
| 5383 | |
| 5384 | void cmLocalGenerator::UpdateOutputToSourceMap(std::string const& output, |
| 5385 | cmSourceFile* source, |
no test coverage detected