diff options
author | Brad King <brad.king@kitware.com> | 2015-05-28 13:56:53 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-05-28 13:56:53 (GMT) |
commit | 0c24c2311b3e98d21cc70bb2e62681c071fa03b4 (patch) | |
tree | 20c77d874cc8838c42a3141ec5541912a9c1b789 /Source/CTest/cmCTestGlobalVC.cxx | |
parent | a2312986af0356854d7cf9eac1d45f9d957abf72 (diff) | |
parent | de2ef3053c37d0a958a92f8d763168d5b4e5dc17 (diff) | |
download | CMake-0c24c2311b3e98d21cc70bb2e62681c071fa03b4.zip CMake-0c24c2311b3e98d21cc70bb2e62681c071fa03b4.tar.gz CMake-0c24c2311b3e98d21cc70bb2e62681c071fa03b4.tar.bz2 |
Merge topic 'ctest-xml-refactor'
de2ef305 cmCTest: Drop unused method overloads
b04500a7 cmCTest{Test,MemCheck}Handler: Port to cmXMLWriter
8fbc509a cmCTestCoverageHandler: Port to cmXMLWriter
82455a9d cmCTestBuildHandler: Port to cmXMLWriter
1dbd86fd cmCTestLaunch: Port to cmXMLWriter
a53bd63e cmCTest: Port GenerateNotesFile to cmXMLWriter
9c0bb7d8 cmCTestConfigureHandler: Port to cmXMLWriter
6cf5cc71 cmCTestUploadHandler: Port to cmXMLWriter
ed42c203 cmCTestUpdateHandler: Port to cmXMLWriter
18825baf cmCTest: Port to cmXMLWriter
f6413400 Add cmXMLWriter class to consolidate XML generation
Diffstat (limited to 'Source/CTest/cmCTestGlobalVC.cxx')
-rw-r--r-- | Source/CTest/cmCTestGlobalVC.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/CTest/cmCTestGlobalVC.cxx b/Source/CTest/cmCTestGlobalVC.cxx index 5f570b5..c091ec4 100644 --- a/Source/CTest/cmCTestGlobalVC.cxx +++ b/Source/CTest/cmCTestGlobalVC.cxx @@ -13,7 +13,7 @@ #include "cmCTest.h" #include "cmSystemTools.h" -#include "cmXMLSafe.h" +#include "cmXMLWriter.h" #include <cmsys/RegularExpression.hxx> @@ -91,36 +91,36 @@ void cmCTestGlobalVC::DoModification(PathStatus status, } //---------------------------------------------------------------------------- -void cmCTestGlobalVC::WriteXMLDirectory(std::ostream& xml, +void cmCTestGlobalVC::WriteXMLDirectory(cmXMLWriter& xml, std::string const& path, Directory const& dir) { const char* slash = path.empty()? "":"/"; - xml << "\t<Directory>\n" - << "\t\t<Name>" << cmXMLSafe(path) << "</Name>\n"; + xml.StartElement("Directory"); + xml.Element("Name", path); for(Directory::const_iterator fi = dir.begin(); fi != dir.end(); ++fi) { std::string full = path + slash + fi->first; this->WriteXMLEntry(xml, path, fi->first, full, fi->second); } - xml << "\t</Directory>\n"; + xml.EndElement(); // Directory } //---------------------------------------------------------------------------- -void cmCTestGlobalVC::WriteXMLGlobal(std::ostream& xml) +void cmCTestGlobalVC::WriteXMLGlobal(cmXMLWriter& xml) { if(!this->NewRevision.empty()) { - xml << "\t<Revision>" << this->NewRevision << "</Revision>\n"; + xml.Element("Revision", this->NewRevision); } if(!this->OldRevision.empty() && this->OldRevision != this->NewRevision) { - xml << "\t<PriorRevision>" << this->OldRevision << "</PriorRevision>\n"; + xml.Element("PriorRevision", this->OldRevision); } } //---------------------------------------------------------------------------- -bool cmCTestGlobalVC::WriteXMLUpdates(std::ostream& xml) +bool cmCTestGlobalVC::WriteXMLUpdates(cmXMLWriter& xml) { cmCTestLog(this->CTest, HANDLER_OUTPUT, " Gathering version information (one . per revision):\n" |