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

Method UpdateOutputToSourceMap

Source/cmLocalGenerator.cxx:5358–5382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5356}
5357
5358void 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
5384void cmLocalGenerator::UpdateOutputToSourceMap(std::string const& output,
5385 cmSourceFile* source,

Callers 2

AddTargetByproductsMethod · 0.95
AddSourceOutputsMethod · 0.95

Calls 2

CreateGeneratedSourceFunction · 0.85
emplaceMethod · 0.80

Tested by

no test coverage detected