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

Method AppendTransitivelyLinkedObjects

Source/cmFastbuildNormalTargetGenerator.cxx:1914–1935  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1912}
1913
1914void cmFastbuildNormalTargetGenerator::AppendTransitivelyLinkedObjects(
1915 cmGeneratorTarget const& target, std::set<std::string>& linkedObjects) const
1916{
1917 std::vector<std::string> objs;
1918 // Consider that all those object are now linked as well.
1919 // Tested in "ExportImport" test.
1920 target.GetTargetObjectNames(Config, objs);
1921 for (std::string const& obj : objs) {
1922 std::string const pathToObj = this->ConvertToFastbuildPath(
1923 cmStrCat(target.GetObjectDirectory(Config), '/', obj));
1924 linkedObjects.insert(pathToObj);
1925 }
1926 // Object libs should not be propagated transitively. It's especially
1927 // important for LinkObjRHSObject2 test where the absence of the propagation
1928 // is tested.
1929 for (auto const& linkedTarget :
1930 target.Target->GetLinkImplementationEntries()) {
1931 auto objAlias = linkedTarget.Value + FASTBUILD_OBJECTS_ALIAS_POSTFIX;
1932 LogMessage("Object target is linked transitively " + objAlias);
1933 linkedObjects.emplace(std::move(objAlias));
1934 }
1935}
1936
1937void cmFastbuildNormalTargetGenerator::AppendCommandLineDep(
1938 FastbuildLinkerNode& linkerNode,

Callers

nothing calls this directly

Calls 8

moveFunction · 0.85
GetTargetObjectNamesMethod · 0.80
GetObjectDirectoryMethod · 0.80
emplaceMethod · 0.80
cmStrCatFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected