diff options
author | Brad King <brad.king@kitware.com> | 2002-06-19 19:21:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-06-19 19:21:49 (GMT) |
commit | 07d35e662dc76fa7702d54f4a9b3ced3dac3c969 (patch) | |
tree | 9cde169f2d59b54ac0a779e0ef55d6260452f84c /Source/cmake.cxx | |
parent | 27a2cad0fcaa0c3733c0adf532d59df7ba3cde29 (diff) | |
download | CMake-07d35e662dc76fa7702d54f4a9b3ced3dac3c969.zip CMake-07d35e662dc76fa7702d54f4a9b3ced3dac3c969.tar.gz CMake-07d35e662dc76fa7702d54f4a9b3ced3dac3c969.tar.bz2 |
ENH: Added cmStringStream class to wrap std::stringstream or std::strstream depending on the platform. The interface is that of std::stringstream, so no "ends" or "rdbuf()->freeze(0)" lines are needed.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index a24ddde..b93a62c 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -43,7 +43,7 @@ cmake::cmake() void cmake::Usage(const char* program) { - std::strstream errorStream; + cmStringStream errorStream; errorStream << "cmake version " << cmMakefile::GetMajorVersion() << "." << cmMakefile::GetMinorVersion() << "\n"; @@ -61,9 +61,9 @@ void cmake::Usage(const char* program) { errorStream << "\"" << i->c_str() << "\" "; } - errorStream << ")\n" << std::ends; + errorStream << ")\n"; - cmSystemTools::Error(errorStream.str()); + cmSystemTools::Error(errorStream.str().c_str()); } // Parse the args @@ -519,7 +519,7 @@ int cmake::Generate(const std::vector<std::string>& args, bool buildMakefiles) void CMakeCommandUsage(const char* program) { - std::strstream errorStream; + cmStringStream errorStream; errorStream << "cmake version " << cmMakefile::GetMajorVersion() @@ -530,14 +530,14 @@ void CMakeCommandUsage(const char* program) << "Available commands: \n" << " copy file destination - copy file to destination (either file or directory)\n" << " remove file1 file2 ... - remove the file(s)\n" - << " time command [args] ... - run command and return elapsed time\n" + << " time command [args] ... - run command and return elapsed time\n"; #if defined(_WIN32) && !defined(__CYGWIN__) + errorStream << " write_regv key value - write registry value\n" - << " delete_regv key - delete registry value\n" + << " delete_regv key - delete registry value\n"; #endif - << std::ends; - cmSystemTools::Error(errorStream.str()); + cmSystemTools::Error(errorStream.str().c_str()); } int cmake::CMakeCommand(std::vector<std::string>& args) |