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

Method AppendPrebuildDeps

Source/cmFastbuildNormalTargetGenerator.cxx:1879–1912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1877}
1878
1879void cmFastbuildNormalTargetGenerator::AppendPrebuildDeps(
1880 FastbuildLinkerNode& linkerNode,
1881 cmComputeLinkInformation::Item const& item) const
1882{
1883 if (!item.Target->IsImported()) {
1884 return;
1885 }
1886 // In "RunCMake.FileAPI" imported object library "imported_object_lib" is
1887 // added w/o import location...
1888 if (item.Target->GetType() == cmStateEnums::OBJECT_LIBRARY) {
1889 return;
1890 }
1891 cmList const list{ GetImportedLoc(item) };
1892 for (std::string const& linkDep : list) {
1893 // In case we know how to generate this file (needed for proper
1894 // sorting by deps). Tested in "RunCMake.target_link_libraries-ALIAS"
1895 // test.
1896 auto fastbuildTarget =
1897 this->GetGlobalGenerator()->GetTargetByOutputName(linkDep);
1898 std::string fastbuildTargetName;
1899 if (fastbuildTarget) {
1900 fastbuildTargetName = std::move(fastbuildTarget->Name);
1901 }
1902 if (!fastbuildTargetName.empty()) {
1903 LogMessage("Adding dep to " + fastbuildTargetName);
1904 linkerNode.PreBuildDependencies.insert(std::move(fastbuildTargetName));
1905 } else {
1906 if (!cmIsNOTFOUND(linkDep)) {
1907 LogMessage(cmStrCat("Adding dep ", linkDep, " for sorting"));
1908 linkerNode.PreBuildDependencies.insert(linkDep);
1909 }
1910 }
1911 }
1912}
1913
1914void cmFastbuildNormalTargetGenerator::AppendTransitivelyLinkedObjects(
1915 cmGeneratorTarget const& target, std::set<std::string>& linkedObjects) const

Callers

nothing calls this directly

Calls 9

moveFunction · 0.85
cmIsNOTFOUNDFunction · 0.85
GetTargetByOutputNameMethod · 0.80
cmStrCatFunction · 0.70
IsImportedMethod · 0.45
GetTypeMethod · 0.45
GetGlobalGeneratorMethod · 0.45
emptyMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected