summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2015-05-23 21:41:09 (GMT)
committerBrad King <brad.king@kitware.com>2015-05-26 15:09:21 (GMT)
commit9c0bb7d8070039cfa3f5b944f90308e0283c4ce3 (patch)
treefbec1a26f4ec9021bed2fada901074fc57ade6b1
parent6cf5cc717f522bcd9e8286a864068d09012dad41 (diff)
downloadCMake-9c0bb7d8070039cfa3f5b944f90308e0283c4ce3.zip
CMake-9c0bb7d8070039cfa3f5b944f90308e0283c4ce3.tar.gz
CMake-9c0bb7d8070039cfa3f5b944f90308e0283c4ce3.tar.bz2
cmCTestConfigureHandler: Port to cmXMLWriter
-rw-r--r--Source/CTest/cmCTestConfigureHandler.cxx38
1 files changed, 16 insertions, 22 deletions
diff --git a/Source/CTest/cmCTestConfigureHandler.cxx b/Source/CTest/cmCTestConfigureHandler.cxx
index 2c2951d..2e8aeb9 100644
--- a/Source/CTest/cmCTestConfigureHandler.cxx
+++ b/Source/CTest/cmCTestConfigureHandler.cxx
@@ -15,7 +15,7 @@
#include "cmCTest.h"
#include "cmGeneratedFileStream.h"
#include "cmake.h"
-#include "cmXMLSafe.h"
+#include "cmXMLWriter.h"
#include <cmsys/Process.h>
@@ -89,28 +89,22 @@ int cmCTestConfigureHandler::ProcessHandler()
if ( os )
{
- this->CTest->StartXML(os, this->AppendXML);
- os << "<Configure>\n"
- << "\t<StartDateTime>" << start_time << "</StartDateTime>"
- << std::endl
- << "\t<StartConfigureTime>" << start_time_time
- << "</StartConfigureTime>\n";
- os << "<ConfigureCommand>" << cCommand << "</ConfigureCommand>"
- << std::endl;
+ cmXMLWriter xml(os);
+ this->CTest->StartXML(xml, this->AppendXML);
+ xml.StartElement("Configure");
+ xml.Element("StartDateTime", start_time);
+ xml.Element("StartConfigureTime", start_time_time);
+ xml.Element("ConfigureCommand", cCommand);
cmCTestOptionalLog(this->CTest, DEBUG, "End" << std::endl, this->Quiet);
- os << "<Log>" << cmXMLSafe(output) << "</Log>" << std::endl;
- std::string end_time = this->CTest->CurrentTime();
- os << "\t<ConfigureStatus>" << retVal << "</ConfigureStatus>\n"
- << "\t<EndDateTime>" << end_time << "</EndDateTime>\n"
- << "\t<EndConfigureTime>" <<
- static_cast<unsigned int>(cmSystemTools::GetTime())
- << "</EndConfigureTime>\n"
- << "<ElapsedMinutes>"
- << static_cast<int>(
- (cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0
- << "</ElapsedMinutes>"
- << "</Configure>" << std::endl;
- this->CTest->EndXML(os);
+ xml.Element("Log", output);
+ xml.Element("ConfigureStatus", retVal);
+ xml.Element("EndDateTime", this->CTest->CurrentTime());
+ xml.Element("EndConfigureTime",
+ static_cast<unsigned int>(cmSystemTools::GetTime()));
+ xml.Element("ElapsedMinutes", static_cast<int>(
+ (cmSystemTools::GetTime() - elapsed_time_start)/6)/10.0);
+ xml.EndElement(); // Configure
+ this->CTest->EndXML(xml);
}
}
else