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

Method Write

Source/cmDepends.cxx:27–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25cmDepends::~cmDepends() = default;
26
27bool cmDepends::Write(std::ostream& makeDepends, std::ostream& internalDepends)
28{
29 std::map<std::string, std::set<std::string>> dependencies;
30 {
31 // Lookup the set of sources to scan.
32 cmList pairs;
33 {
34 std::string const srcLang = "CMAKE_DEPENDS_CHECK_" + this->Language;
35 cmMakefile* mf = this->LocalGenerator->GetMakefile();
36 pairs.assign(mf->GetSafeDefinition(srcLang));
37 }
38 for (auto si = pairs.begin(); si != pairs.end();) {
39 // Get the source and object file.
40 std::string const& src = *si++;
41 if (si == pairs.end()) {
42 break;
43 }
44 std::string const& obj = *si++;
45 dependencies[obj].insert(src);
46 }
47 }
48 for (auto const& d : dependencies) {
49 // Write the dependencies for this pair.
50 if (!this->WriteDependencies(d.second, d.first, makeDepends,
51 internalDepends)) {
52 return false;
53 }
54 }
55
56 return this->Finalize(makeDepends, internalDepends);
57}
58
59bool cmDepends::Finalize(std::ostream& /*unused*/, std::ostream& /*unused*/)
60{

Callers

nothing calls this directly

Calls 7

WriteDependenciesMethod · 0.95
FinalizeMethod · 0.95
assignMethod · 0.80
GetMakefileMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected