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

Method PatchUpdatesXml

Source/CPack/IFW/cmCPackIFWRepository.cxx:169–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167};
168
169bool cmCPackIFWRepository::PatchUpdatesXml()
170{
171 // Lazy directory initialization
172 if (this->Directory.empty() && this->Generator) {
173 this->Directory = this->Generator->toplevel;
174 }
175
176 // Filenames
177 std::string updatesXml = this->Directory + "/repository/Updates.xml";
178 std::string updatesPatchXml =
179 this->Directory + "/repository/UpdatesPatch.xml";
180
181 // Output stream
182 cmGeneratedFileStream fout(updatesPatchXml);
183 cmXMLWriter xout(fout);
184
185 xout.StartDocument();
186
187 this->WriteGeneratedByToStrim(xout);
188
189 // Patch
190 {
191 cmCPackIFWUpdatesPatcher patcher(this, xout);
192 patcher.ParseFile(updatesXml.data());
193 }
194
195 xout.EndDocument();
196
197 fout.Close();
198
199 return cmSystemTools::RenameFile(updatesPatchXml, updatesXml);
200}
201
202void cmCPackIFWRepository::WriteRepositoryConfig(cmXMLWriter& xout) const
203{

Callers 1

RunRepogenMethod · 0.80

Calls 7

StartDocumentMethod · 0.80
EndDocumentMethod · 0.80
CloseMethod · 0.80
emptyMethod · 0.45
ParseFileMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected