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

Method ComputeObjectFilenames

Source/cmLocalFastbuildGenerator.cxx:65–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void cmLocalFastbuildGenerator::ComputeObjectFilenames(
66 std::map<cmSourceFile const*, cmObjectLocations>& mapping,
67 std::string const& config, cmGeneratorTarget const* gt)
68{
69 char const* customExt = gt->GetCustomObjectExtension();
70 for (auto& si : mapping) {
71 cmSourceFile const* sf = si.first;
72 si.second.LongLoc = this->GetObjectFileNameWithoutTarget(
73 *sf, gt->ObjectDirectory, nullptr, nullptr);
74 this->FillCustomInstallObjectLocations(*sf, config, nullptr,
75 si.second.InstallLongLoc);
76 // FASTBuild always appends output extension to the source file name.
77 // So if custom ext is ".ptx", then
78 // "kernelA.cu" will be outputted as "kernelA.cu.ptx",
79 // that's why we can't just replace ".cu" with ".ptx".
80 // This is needed to resolve $<TARGET_OBJECTS> genex correctly.
81 // Tested in "CudaOnly.ExportPTX" test.
82 if (customExt) {
83 si.second.LongLoc.Update(
84 cmStrCat(si.second.LongLoc.GetPath(), customExt));
85 }
86 }
87}
88
89void cmLocalFastbuildGenerator::AppendFlagEscape(
90 std::string& flags, std::string const& rawFlag) const

Callers

nothing calls this directly

Calls 6

GetPathMethod · 0.80
cmStrCatFunction · 0.70
UpdateMethod · 0.45

Tested by

no test coverage detected