summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-06-06 19:14:40 (GMT)
committerBrad King <brad.king@kitware.com>2012-06-12 19:40:24 (GMT)
commit94de98290230e010a28fcbf36c0f691b564fbc5c (patch)
treeac8a028499e5e09e6d3ad6b70325fb02c0881625 /Source/cmGlobalNinjaGenerator.cxx
parenteb53bc27733e5762906eb251184df317f1c4664d (diff)
downloadCMake-94de98290230e010a28fcbf36c0f691b564fbc5c.zip
CMake-94de98290230e010a28fcbf36c0f691b564fbc5c.tar.gz
CMake-94de98290230e010a28fcbf36c0f691b564fbc5c.tar.bz2
Avoid direct use of std::(o|)stringstream (#13272)
Older C++ compilers do not provide a standard std::stringstream. Use our compatibility interfaces instead. Also avoid std::stringstream(openmode) signature. Our approximate stringstream implementation provided when the standard one is not available does not support the openmode argument.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 0e89fab..40348e6 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -66,7 +66,7 @@ std::string cmGlobalNinjaGenerator::EncodeIdent(const std::string &ident,
if (std::find_if(ident.begin(), ident.end(),
std::not1(std::ptr_fun(IsIdentChar))) != ident.end()) {
static unsigned VarNum = 0;
- std::ostringstream names;
+ cmOStringStream names;
names << "ident" << VarNum++;
vars << names.str() << " = " << ident << "\n";
return "$" + names.str();
@@ -123,7 +123,7 @@ void cmGlobalNinjaGenerator::WriteBuild(std::ostream& os,
cmGlobalNinjaGenerator::WriteComment(os, comment);
- std::ostringstream builds;
+ cmOStringStream builds;
// TODO: Better formatting for when there are multiple input/output files.
@@ -825,7 +825,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
cmLocalGenerator *lg = this->LocalGenerators[0];
cmMakefile* mfRoot = lg->GetMakefile();
- std::ostringstream cmd;
+ cmOStringStream cmd;
cmd << lg->ConvertToOutputFormat(
mfRoot->GetRequiredDefinition("CMAKE_COMMAND"),
cmLocalGenerator::SHELL)