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

Method AddLibraries

Source/cmComputeLinkDepends.cxx:460–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

458 }
459
460 void AddLibraries(std::vector<size_t> const& libEntries)
461 {
462 if (this->Order == Reverse) {
463 std::vector<size_t> entries;
464 if (this->Deduplication == All &&
465 this->Target->GetPolicyStatusCMP0179() == cmPolicies::NEW) {
466 // keep the first occurrence of the static libraries
467 std::set<size_t> emitted{ this->Emitted };
468 for (auto index : libEntries) {
469 LinkEntry const& entry = this->Entries[index];
470 if (!entry.Target ||
471 entry.Target->GetType() != cmStateEnums::STATIC_LIBRARY) {
472 entries.emplace_back(index);
473 continue;
474 }
475 if (this->IncludeEntry(entry) || emitted.insert(index).second) {
476 entries.emplace_back(index);
477 }
478 }
479 } else {
480 entries = libEntries;
481 }
482 // Iterate in reverse order so we can keep only the last occurrence
483 // of the shared libraries.
484 this->AddLibraries(cmReverseRange(entries));
485 } else {
486 this->AddLibraries(cmMakeRange(libEntries));
487 }
488 }
489
490 void AddObjects(std::vector<size_t> const& objectEntries)
491 {

Callers 1

Calls 6

IncludeEntryMethod · 0.95
cmReverseRangeFunction · 0.85
cmMakeRangeFunction · 0.85
emplace_backMethod · 0.80
GetTypeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected