| 25 | cmDepends::~cmDepends() = default; |
| 26 | |
| 27 | bool 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 | |
| 59 | bool cmDepends::Finalize(std::ostream& /*unused*/, std::ostream& /*unused*/) |
| 60 | { |
nothing calls this directly
no test coverage detected