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

Method GetLocalObjectFiles

Source/cmLocalUnixMakefileGenerator3.cxx:228–252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void cmLocalUnixMakefileGenerator3::GetLocalObjectFiles(
229 std::map<std::string, LocalObjectInfo>& localObjectFiles)
230{
231 for (auto const& gt : this->GetGeneratorTargets()) {
232 if (!gt->CanCompileSources()) {
233 continue;
234 }
235 std::vector<cmSourceFile const*> objectSources;
236 gt->GetObjectSources(objectSources, this->GetConfigName());
237 // Compute full path to object file directory for this target.
238 std::string dir = cmStrCat(gt->GetSupportDirectory(), '/');
239 // Compute the name of each object file.
240 for (cmSourceFile const* sf : objectSources) {
241 bool hasSourceExtension = true;
242 std::string objectName =
243 this->GetObjectFileNameWithoutTarget(*sf, dir, &hasSourceExtension);
244 if (cmSystemTools::FileIsFullPath(objectName)) {
245 objectName = cmSystemTools::GetFilenameName(objectName);
246 }
247 LocalObjectInfo& info = localObjectFiles[objectName];
248 info.HasSourceExtension = hasSourceExtension;
249 info.emplace_back(gt.get(), sf->GetLanguage());
250 }
251 }
252}
253
254void cmLocalUnixMakefileGenerator3::GetIndividualFileTargets(
255 std::vector<std::string>& targets)

Callers 2

WriteLocalMakefileMethod · 0.95

Calls 8

GetObjectSourcesMethod · 0.80
GetSupportDirectoryMethod · 0.80
emplace_backMethod · 0.80
GetLanguageMethod · 0.80
cmStrCatFunction · 0.70
CanCompileSourcesMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected