diff options
author | Brad King <brad.king@kitware.com> | 2015-01-12 13:57:39 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-01-12 13:57:39 (GMT) |
commit | b5a467262b61065ed5d1b8d545cc2ade548b9d0b (patch) | |
tree | 8aa5908e3731be5fcf097de849fef3a432388162 /Source/CTest | |
parent | 6c61ffaf9b1616e6938b78ca19f17f9a9f87f3ec (diff) | |
parent | 0f7bdd61da51ea8609246fe6fd05a13235fe75db (diff) | |
download | CMake-b5a467262b61065ed5d1b8d545cc2ade548b9d0b.zip CMake-b5a467262b61065ed5d1b8d545cc2ade548b9d0b.tar.gz CMake-b5a467262b61065ed5d1b8d545cc2ade548b9d0b.tar.bz2 |
Merge topic 'drop-ancient-workarounds'
0f7bdd61 Remove VS 6 special case.
5e92c826 Remove some obsolete stuff.
15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream.
931e055d Port all cmOStringStream to std::ostringstream.
f194a009 Remove unused cmIStringStream class.
3ec1bb15 cmStandardIncludes: Remove std namespace hack.
bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack.
28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler.
837a8a63 cmStandardIncludes: Drop Comeau-related workaround.
4030ddfd Remove Borland-related undef.
17d6a6fd cmStandardIncludes: Remove comment about Borland.
26fb5011 Drop SGI as a CMake host compiler.
Diffstat (limited to 'Source/CTest')
21 files changed, 36 insertions, 44 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index a101e39..b1fb02d 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -55,7 +55,7 @@ int cmCTestBuildAndTestHandler::ProcessHandler() //---------------------------------------------------------------------- int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring, - cmOStringStream &out, std::string &cmakeOutString, std::string &cwd, + std::ostringstream &out, std::string &cmakeOutString, std::string &cwd, cmake *cm) { unsigned int k; @@ -209,7 +209,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) std::string cmakeOutString; cmCTestBuildAndTestCaptureRAII captureRAII(cm, cmakeOutString); static_cast<void>(captureRAII); - cmOStringStream out; + std::ostringstream out; if ( this->CTest->GetConfigType().size() == 0 && this->ConfigSample.size()) diff --git a/Source/CTest/cmCTestBuildAndTestHandler.h b/Source/CTest/cmCTestBuildAndTestHandler.h index 5a7b916..a75c631 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.h +++ b/Source/CTest/cmCTestBuildAndTestHandler.h @@ -50,7 +50,7 @@ public: protected: ///! Run CMake and build a test and then run it as a single test. int RunCMakeAndTest(std::string* output); - int RunCMake(std::string* outstring, cmOStringStream &out, + int RunCMake(std::string* outstring, std::ostringstream &out, std::string &cmakeOutString, std::string &cwd, cmake *cm); diff --git a/Source/CTest/cmCTestBuildCommand.cxx b/Source/CTest/cmCTestBuildCommand.cxx index a5a593a..c4df741 100644 --- a/Source/CTest/cmCTestBuildCommand.cxx +++ b/Source/CTest/cmCTestBuildCommand.cxx @@ -148,7 +148,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler() } else { - cmOStringStream ostr; + std::ostringstream ostr; ostr << "has no project to build. If this is a " "\"built with CMake\" project, verify that CTEST_CMAKE_GENERATOR " "and CTEST_PROJECT_NAME are set." @@ -181,7 +181,7 @@ bool cmCTestBuildCommand::InitialPass(std::vector<std::string> const& args, bool ret = cmCTestHandlerCommand::InitialPass(args, status); if ( this->Values[ctb_NUMBER_ERRORS] && *this->Values[ctb_NUMBER_ERRORS]) { - cmOStringStream str; + std::ostringstream str; str << this->Handler->GetTotalErrors(); this->Makefile->AddDefinition( this->Values[ctb_NUMBER_ERRORS], str.str().c_str()); @@ -189,7 +189,7 @@ bool cmCTestBuildCommand::InitialPass(std::vector<std::string> const& args, if ( this->Values[ctb_NUMBER_WARNINGS] && *this->Values[ctb_NUMBER_WARNINGS]) { - cmOStringStream str; + std::ostringstream str; str << this->Handler->GetTotalWarnings(); this->Makefile->AddDefinition( this->Values[ctb_NUMBER_WARNINGS], str.str().c_str()); diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx index ef62fd3..0f13263 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -66,7 +66,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() const std::string cmakelists_file = source_dir + "/CMakeLists.txt"; if ( !cmSystemTools::FileExists(cmakelists_file.c_str()) ) { - cmOStringStream e; + std::ostringstream e; e << "CMakeLists.txt file does not exist [" << cmakelists_file << "]"; this->SetError(e.str()); diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index fb3e367..6598111 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -544,7 +544,7 @@ int cmCTestCoverageHandler::ProcessHandler() cmsys::ifstream ifs(fullFileName.c_str()); if ( !ifs) { - cmOStringStream ostr; + std::ostringstream ostr; ostr << "Cannot open source file: " << fullFileName; errorsWhileAccumulating.push_back(ostr.str()); error ++; @@ -563,7 +563,7 @@ int cmCTestCoverageHandler::ProcessHandler() if ( !cmSystemTools::GetLineFromStream(ifs, line) && cc != fcov.size() -1 ) { - cmOStringStream ostr; + std::ostringstream ostr; ostr << "Problem reading source file: " << fullFileName << " line:" << cc << " out total: " << fcov.size()-1; errorsWhileAccumulating.push_back(ostr.str()); @@ -584,7 +584,7 @@ int cmCTestCoverageHandler::ProcessHandler() } if ( cmSystemTools::GetLineFromStream(ifs, line) ) { - cmOStringStream ostr; + std::ostringstream ostr; ostr << "Looks like there are more lines in the file: " << fullFileName; errorsWhileAccumulating.push_back(ostr.str()); } @@ -633,7 +633,7 @@ int cmCTestCoverageHandler::ProcessHandler() cmsys::ifstream ifs(fullPath.c_str()); if (!ifs) { - cmOStringStream ostr; + std::ostringstream ostr; ostr << "Cannot open source file: " << fullPath; errorsWhileAccumulating.push_back(ostr.str()); error ++; diff --git a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx index 5ddef01..e175592 100644 --- a/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx +++ b/Source/CTest/cmCTestEmptyBinaryDirectoryCommand.cxx @@ -24,7 +24,7 @@ bool cmCTestEmptyBinaryDirectoryCommand if ( !cmCTestScriptHandler::EmptyBinaryDirectory(args[0].c_str()) ) { - cmOStringStream ostr; + std::ostringstream ostr; ostr << "problem removing the binary directory: " << args[0]; this->SetError(ostr.str()); return false; diff --git a/Source/CTest/cmCTestGenericHandler.cxx b/Source/CTest/cmCTestGenericHandler.cxx index 2df2229..13c8ca5 100644 --- a/Source/CTest/cmCTestGenericHandler.cxx +++ b/Source/CTest/cmCTestGenericHandler.cxx @@ -103,7 +103,7 @@ bool cmCTestGenericHandler::StartResultingXML(cmCTest::Part part, << std::endl;); return false; } - cmOStringStream ostr; + std::ostringstream ostr; ostr << name; if ( this->SubmitIndex > 0 ) { @@ -142,7 +142,7 @@ bool cmCTestGenericHandler::StartLogFile(const char* name, "Cannot create log file without providing the name" << std::endl;); return false; } - cmOStringStream ostr; + std::ostringstream ostr; ostr << "Last" << name; if ( this->SubmitIndex > 0 ) { diff --git a/Source/CTest/cmCTestHandlerCommand.cxx b/Source/CTest/cmCTestHandlerCommand.cxx index 5b525dd..b886777 100644 --- a/Source/CTest/cmCTestHandlerCommand.cxx +++ b/Source/CTest/cmCTestHandlerCommand.cxx @@ -46,7 +46,7 @@ bool cmCTestHandlerCommand if(!this->CheckArgumentKeyword(args[i]) && !this->CheckArgumentValue(args[i])) { - cmOStringStream e; + std::ostringstream e; e << "called with unknown argument \"" << args[i] << "\"."; this->SetError(e.str()); return false; @@ -141,7 +141,7 @@ bool cmCTestHandlerCommand int res = handler->ProcessHandler(); if ( this->Values[ct_RETURN_VALUE] && *this->Values[ct_RETURN_VALUE]) { - cmOStringStream str; + std::ostringstream str; str << res; this->Makefile->AddDefinition( this->Values[ct_RETURN_VALUE], str.str().c_str()); @@ -183,7 +183,7 @@ bool cmCTestHandlerCommand::CheckArgumentValue(std::string const& arg) unsigned int k = this->ArgumentIndex; if(this->Values[k]) { - cmOStringStream e; + std::ostringstream e; e << "Called with more than one value for " << this->Arguments[k]; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); this->ArgumentDoing = ArgumentDoingError; diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx b/Source/CTest/cmCTestMemCheckHandler.cxx index 09cf760..fd0388a 100644 --- a/Source/CTest/cmCTestMemCheckHandler.cxx +++ b/Source/CTest/cmCTestMemCheckHandler.cxx @@ -75,7 +75,7 @@ public: this->ParseError(atts); } // Create the log - cmOStringStream ostr; + std::ostringstream ostr; ostr << name << ":\n"; int i = 0; for(; atts[i] != 0; i+=2) @@ -198,7 +198,7 @@ void cmCTestMemCheckHandler::GenerateTestCommand( { std::vector<std::string>::size_type pp; std::string index; - cmOStringStream stream; + std::ostringstream stream; std::string memcheckcommand = cmSystemTools::ConvertToOutputPath(this->MemoryTester.c_str()); stream << test; @@ -834,7 +834,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckSanitizerOutput( int defects = 0; std::vector<std::string> lines; cmSystemTools::Split(str.c_str(), lines); - cmOStringStream ostr; + std::ostringstream ostr; log = ""; for( std::vector<std::string>::iterator i = lines.begin(); i != lines.end(); ++i) @@ -878,7 +878,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckPurifyOutput( { std::vector<std::string> lines; cmSystemTools::Split(str.c_str(), lines); - cmOStringStream ostr; + std::ostringstream ostr; log = ""; cmsys::RegularExpression pfW("^\\[[WEI]\\] ([A-Z][A-Z][A-Z][A-Z]*): "); @@ -941,7 +941,7 @@ bool cmCTestMemCheckHandler::ProcessMemCheckValgrindOutput( std::string::size_type cc; - cmOStringStream ostr; + std::ostringstream ostr; log = ""; int defects = 0; @@ -1269,7 +1269,7 @@ void cmCTestMemCheckHandler::TestOutputFileNames(int test, files) { std::string index; - cmOStringStream stream; + std::ostringstream stream; stream << test; index = stream.str(); std::string ofile = this->MemoryTesterOutputFile; diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx index b83ebe0..b32d47b 100644 --- a/Source/CTest/cmCTestMultiProcessHandler.cxx +++ b/Source/CTest/cmCTestMultiProcessHandler.cxx @@ -658,7 +658,7 @@ void cmCTestMultiProcessHandler::PrintTestList() { cmCTestLog(this->CTest, HANDLER_OUTPUT, " Test"); } - cmOStringStream indexStr; + std::ostringstream indexStr; indexStr << " #" << p.Index << ":"; cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex())) diff --git a/Source/CTest/cmCTestRunScriptCommand.cxx b/Source/CTest/cmCTestRunScriptCommand.cxx index bdf9b9c..7afbe04 100644 --- a/Source/CTest/cmCTestRunScriptCommand.cxx +++ b/Source/CTest/cmCTestRunScriptCommand.cxx @@ -54,7 +54,7 @@ bool cmCTestRunScriptCommand int ret; cmCTestScriptHandler::RunScript(this->CTest, args[i].c_str(), !np, &ret); - cmOStringStream str; + std::ostringstream str; str << ret; this->Makefile->AddDefinition(returnVariable, str.str().c_str()); } diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index ff55528..2a39051 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -694,7 +694,7 @@ void cmCTestRunTest::WriteLogOutputTop(size_t completed, size_t total) cmCTestLog(this->CTest, HANDLER_OUTPUT, "Test"); } - cmOStringStream indexStr; + std::ostringstream indexStr; indexStr << " #" << this->Index << ":"; cmCTestLog(this->CTest, HANDLER_OUTPUT, std::setw(3 + getNumWidth(this->TestHandler->GetMaxIndex())) diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index f958e7b..71edd5b 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -299,7 +299,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg) cmsysProcess_Delete(cp); if(failed) { - cmOStringStream message; + std::ostringstream message; message << "Error running command: ["; message << result << "] "; for(std::vector<const char*>::iterator i = argv.begin(); diff --git a/Source/CTest/cmCTestStartCommand.cxx b/Source/CTest/cmCTestStartCommand.cxx index 1a39a8a..8ea6cef 100644 --- a/Source/CTest/cmCTestStartCommand.cxx +++ b/Source/CTest/cmCTestStartCommand.cxx @@ -126,7 +126,7 @@ bool cmCTestStartCommand } if(!cmSystemTools::FileIsDirectory(sourceDir)) { - cmOStringStream e; + std::ostringstream e; e << "given source path\n" << " " << sourceDir << "\n" << "which is not an existing directory. " diff --git a/Source/CTest/cmCTestSubmitCommand.cxx b/Source/CTest/cmCTestSubmitCommand.cxx index 4aa8d04..4005a63 100644 --- a/Source/CTest/cmCTestSubmitCommand.cxx +++ b/Source/CTest/cmCTestSubmitCommand.cxx @@ -202,7 +202,7 @@ bool cmCTestSubmitCommand::CheckArgumentValue(std::string const& arg) } else { - cmOStringStream e; + std::ostringstream e; e << "Part name \"" << arg << "\" is invalid."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); this->ArgumentDoing = ArgumentDoingError; @@ -219,7 +219,7 @@ bool cmCTestSubmitCommand::CheckArgumentValue(std::string const& arg) } else { - cmOStringStream e; + std::ostringstream e; e << "File \"" << filename << "\" does not exist. Cannot submit " << "a non-existent file."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); diff --git a/Source/CTest/cmCTestTestCommand.cxx b/Source/CTest/cmCTestTestCommand.cxx index 231f035..d209094 100644 --- a/Source/CTest/cmCTestTestCommand.cxx +++ b/Source/CTest/cmCTestTestCommand.cxx @@ -53,7 +53,7 @@ cmCTestGenericHandler* cmCTestTestCommand::InitializeHandler() if ( this->Values[ctt_START] || this->Values[ctt_END] || this->Values[ctt_STRIDE] ) { - cmOStringStream testsToRunString; + std::ostringstream testsToRunString; if ( this->Values[ctt_START] ) { testsToRunString << this->Values[ctt_START]; diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index 0d8d46e..cfb0274 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1865,7 +1865,7 @@ std::string cmCTestTestHandler::GenerateRegressionImages( SPACE_REGEX "*(name|type|encoding|compression)=\"([^\"]*)\"" SPACE_REGEX "*>([^<]*)</DartMeasurementFile>"); - cmOStringStream ostr; + std::ostringstream ostr; bool done = false; std::string cxml = xml; while ( ! done ) @@ -2098,7 +2098,7 @@ bool cmCTestTestHandler::CleanTestOutput(std::string& output, size_t length) output = output.substr(0, current - begin); // Append truncation message. - cmOStringStream msg; + std::ostringstream msg; msg << "...\n" "The rest of the test output was removed since it exceeds the threshold " "of " << length << " bytes.\n"; diff --git a/Source/CTest/cmCTestUpdateHandler.cxx b/Source/CTest/cmCTestUpdateHandler.cxx index 7206914..772c9aa 100644 --- a/Source/CTest/cmCTestUpdateHandler.cxx +++ b/Source/CTest/cmCTestUpdateHandler.cxx @@ -413,7 +413,7 @@ bool cmCTestUpdateHandler::SelectVCS() } if (this->UpdateCommand.empty()) { - cmOStringStream e; + std::ostringstream e; e << "Cannot find UpdateCommand "; if (key) { diff --git a/Source/CTest/cmCTestUpdateHandler.h b/Source/CTest/cmCTestUpdateHandler.h index 954c024..d2423c0 100644 --- a/Source/CTest/cmCTestUpdateHandler.h +++ b/Source/CTest/cmCTestUpdateHandler.h @@ -17,10 +17,6 @@ #include "cmCTestGenericHandler.h" #include "cmListFileCache.h" -#if defined(__sgi) && !defined(__GNUC__) -# pragma set woff 1375 /* base class destructor not virtual */ -#endif - /** \class cmCTestUpdateHandler * \brief A class that handles ctest -S invocations * @@ -70,8 +66,4 @@ private: bool SelectVCS(); }; -#if defined(__sgi) && !defined(__GNUC__) -# pragma reset woff 1375 /* base class destructor not virtual */ -#endif - #endif diff --git a/Source/CTest/cmCTestUploadCommand.cxx b/Source/CTest/cmCTestUploadCommand.cxx index f7de294..5613751 100644 --- a/Source/CTest/cmCTestUploadCommand.cxx +++ b/Source/CTest/cmCTestUploadCommand.cxx @@ -55,7 +55,7 @@ bool cmCTestUploadCommand::CheckArgumentValue(std::string const& arg) } else { - cmOStringStream e; + std::ostringstream e; e << "File \"" << filename << "\" does not exist. Cannot submit " << "a non-existent file."; this->Makefile->IssueMessage(cmake::FATAL_ERROR, e.str()); diff --git a/Source/CTest/cmCTestVC.cxx b/Source/CTest/cmCTestVC.cxx index 15f796f..6e93e95 100644 --- a/Source/CTest/cmCTestVC.cxx +++ b/Source/CTest/cmCTestVC.cxx @@ -105,7 +105,7 @@ bool cmCTestVC::RunChild(char const* const* cmd, OutputParser* out, //---------------------------------------------------------------------------- std::string cmCTestVC::ComputeCommandLine(char const* const* cmd) { - cmOStringStream line; + std::ostringstream line; const char* sep = ""; for(const char* const* arg = cmd; *arg; ++arg) { |