mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-10 19:39:52 -05:00
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.
This commit is contained in:
@@ -280,7 +280,7 @@ std::string cmLocalNinjaGenerator::BuildCommandLine(
|
||||
// $in variables. A discussion about dealing with multiple commands in
|
||||
// a rule is started here:
|
||||
// groups.google.com/group/ninja-build/browse_thread/thread/d515f23a78986008
|
||||
std::ostringstream cmd;
|
||||
cmOStringStream cmd;
|
||||
for (std::vector<std::string>::const_iterator li = cmdLines.begin();
|
||||
li != cmdLines.end(); ++li) {
|
||||
if (li != cmdLines.begin())
|
||||
@@ -299,7 +299,7 @@ void cmLocalNinjaGenerator::AppendCustomCommandLines(const cmCustomCommand *cc,
|
||||
if (!wd)
|
||||
wd = this->GetMakefile()->GetStartOutputDirectory();
|
||||
|
||||
std::ostringstream cdCmd;
|
||||
cmOStringStream cdCmd;
|
||||
cdCmd << "cd " << this->ConvertToOutputFormat(wd, SHELL);
|
||||
cmdLines.push_back(cdCmd.str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user