diff options
author | Brad King <brad.king@kitware.com> | 2009-02-05 21:31:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-02-05 21:31:37 (GMT) |
commit | dc13914cd698b49cbae491c1e1aebbcd44fbe932 (patch) | |
tree | 4eaa716c3e2160a7e81125360d83dc9f87241ede /Source/CTest/cmCTestBuildHandler.cxx | |
parent | f16a471576199ec275463e35ff17849350c0da79 (diff) | |
download | CMake-dc13914cd698b49cbae491c1e1aebbcd44fbe932.zip CMake-dc13914cd698b49cbae491c1e1aebbcd44fbe932.tar.gz CMake-dc13914cd698b49cbae491c1e1aebbcd44fbe932.tar.bz2 |
ENH: Create cmXMLSafe to help escapes in XML
This class provides easy syntax to efficiently insert blocks of data
into XML documents with proper escapes. It replaces the old
cmCTest::MakeXMLSafe and cmSystemTools::MakeXMLSafe methods which
allocated extra memory instead of directly streaming the data.
Diffstat (limited to 'Source/CTest/cmCTestBuildHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildHandler.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildHandler.cxx b/Source/CTest/cmCTestBuildHandler.cxx index 9e67f73..76d9425 100644 --- a/Source/CTest/cmCTestBuildHandler.cxx +++ b/Source/CTest/cmCTestBuildHandler.cxx @@ -23,6 +23,7 @@ #include "cmLocalGenerator.h" #include "cmGlobalGenerator.h" #include "cmGeneratedFileStream.h" +#include "cmXMLSafe.h" //#include <cmsys/RegularExpression.hxx> #include <cmsys/Process.h> @@ -490,7 +491,7 @@ void cmCTestBuildHandler::GenerateXMLHeader(std::ostream& os) static_cast<unsigned int>(this->StartBuildTime) << "</StartBuildTime>\n" << "<BuildCommand>" - << this->CTest->MakeXMLSafe( + << cmXMLSafe( this->CTest->GetCTestConfiguration("MakeCommand")) << "</BuildCommand>" << std::endl; } @@ -526,7 +527,7 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os) } os << "\t<" << (cm->Error ? "Error" : "Warning") << ">\n" << "\t\t<BuildLogLine>" << cm->LogLine << "</BuildLogLine>\n" - << "\t\t<Text>" << this->CTest->MakeXMLSafe(cm->Text) + << "\t\t<Text>" << cmXMLSafe(cm->Text).Quotes(false) << "\n</Text>" << std::endl; std::vector<cmCTestCompileErrorWarningRex>::iterator rit; for ( rit = this->ErrorWarningFileLineRegex.begin(); @@ -579,9 +580,9 @@ void cmCTestBuildHandler::GenerateXMLLogScraped(std::ostream& os) << "</SourceLineNumber>" << std::endl; } } - os << "\t\t<PreContext>" << this->CTest->MakeXMLSafe(cm->PreContext) + os << "\t\t<PreContext>" << cmXMLSafe(cm->PreContext).Quotes(false) << "</PreContext>\n" - << "\t\t<PostContext>" << this->CTest->MakeXMLSafe(cm->PostContext); + << "\t\t<PostContext>" << cmXMLSafe(cm->PostContext).Quotes(false); // is this the last warning or error, if so notify if (cm->Error && !numErrorsAllowed || !cm->Error && !numWarningsAllowed) |