diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-01-27 15:15:01 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-01-27 15:15:01 (GMT) |
commit | 62b310bc52b9feefab32992f7bcebaecbf3aa857 (patch) | |
tree | f1070331289cf33a4e15edcf4f616005f6b3ff8b /Source/CTest/cmCTestCoverageHandler.cxx | |
parent | 14477cee6e8a380e74f4cbf70afe5f3c3bfbd8a2 (diff) | |
download | CMake-62b310bc52b9feefab32992f7bcebaecbf3aa857.zip CMake-62b310bc52b9feefab32992f7bcebaecbf3aa857.tar.gz CMake-62b310bc52b9feefab32992f7bcebaecbf3aa857.tar.bz2 |
ENH: Add compression support to XML files
Diffstat (limited to 'Source/CTest/cmCTestCoverageHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 204d684..8883b39 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -20,6 +20,7 @@ #include "cmCTest.h" #include "cmake.h" #include "cmSystemTools.h" +#include "cmGeneratedFileStream.h" #include "cmGlob.h" #include <cmsys/Process.h> #include <cmsys/RegularExpression.hxx> @@ -38,13 +39,13 @@ cmCTestCoverageHandler::cmCTestCoverageHandler() } //---------------------------------------------------------------------- -bool cmCTestCoverageHandler::StartLogFile(std::ofstream& covLogFile, int logFileCount) +bool cmCTestCoverageHandler::StartLogFile(cmGeneratedFileStream& covLogFile, int logFileCount) { char covLogFilename[1024]; sprintf(covLogFilename, "CoverageLog-%d.xml", logFileCount); std::cout << "Open file: " << covLogFilename << std::endl; if (!m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), - covLogFilename, covLogFile)) + covLogFilename, covLogFile, true)) { std::cerr << "Cannot open log file: " << covLogFilename << std::endl; return false; @@ -57,7 +58,7 @@ bool cmCTestCoverageHandler::StartLogFile(std::ofstream& covLogFile, int logFile } //---------------------------------------------------------------------- -void cmCTestCoverageHandler::EndLogFile(std::ofstream& ostr, int logFileCount) +void cmCTestCoverageHandler::EndLogFile(cmGeneratedFileStream& ostr, int logFileCount) { std::string local_end_time = m_CTest->CurrentTime(); ostr << "\t<EndDateTime>" << local_end_time << "</EndDateTime>" << std::endl @@ -324,11 +325,11 @@ int cmCTestCoverageHandler::CoverageDirectory(cmCTest *ctest_inst) } } - std::ofstream covSumFile; - std::ofstream covLogFile; + cmGeneratedFileStream covSumFile; + cmGeneratedFileStream covLogFile; if (!m_CTest->OpenOutputFile(m_CTest->GetCurrentTag(), - "Coverage.xml", covSumFile)) + "Coverage.xml", covSumFile, true)) { std::cerr << "Cannot open coverage summary file: Coverage.xml" << std::endl; return 1; |