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

Method GetSourcesWithOutput

Source/cmLocalGenerator.cxx:5224–5241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5222}
5223
5224cmSourcesWithOutput cmLocalGenerator::GetSourcesWithOutput(
5225 std::string const& name) const
5226{
5227 // Linear search? Also see GetSourceFileWithOutput for detail.
5228 if (!cmSystemTools::FileIsFullPath(name)) {
5229 cmSourcesWithOutput sources;
5230 sources.Target = this->LinearGetTargetWithOutput(name);
5231 sources.Source = this->LinearGetSourceFileWithOutput(
5232 name, cmSourceOutputKind::OutputOrByproduct, sources.SourceIsByproduct);
5233 return sources;
5234 }
5235 // Otherwise we use an efficient lookup map.
5236 auto o = this->OutputToSource.find(name);
5237 if (o != this->OutputToSource.end()) {
5238 return o->second.Sources;
5239 }
5240 return {};
5241}
5242
5243cmSourceFile* cmLocalGenerator::GetSourceFileWithOutput(
5244 std::string const& name, cmSourceOutputKind kind) const

Callers 2

FollowNameMethod · 0.80
GetDependsMethod · 0.80

Calls 4

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected