Commit 931e055d authored by Stephen Kelly's avatar Stephen Kelly

Port all cmOStringStream to std::ostringstream.

All compilers hosting CMake support the std class.
parent f194a009
......@@ -24,7 +24,7 @@
#endif
#define cmCPackLogger(logType, msg) \
do { \
cmOStringStream cmCPackLog_msg; \
std::ostringstream cmCPackLog_msg; \
cmCPackLog_msg << msg; \
if(Generator) { \
Generator->Logger->Log(logType, __FILE__, __LINE__, \
......
......@@ -25,7 +25,7 @@
#endif
#define cmCPackLogger(logType, msg) \
do { \
cmOStringStream cmCPackLog_msg; \
std::ostringstream cmCPackLog_msg; \
cmCPackLog_msg << msg; \
if(Generator) { \
Generator->Logger->Log(logType, __FILE__, __LINE__, \
......
......@@ -112,24 +112,24 @@ int cmCPackBundleGenerator::ConstructBundle()
// The staging directory contains everything that will end-up inside the
// final disk image ...
cmOStringStream staging;
std::ostringstream staging;
staging << toplevel;
cmOStringStream contents;
std::ostringstream contents;
contents << staging.str() << "/" << cpack_bundle_name
<< ".app/" << "Contents";
cmOStringStream application;
std::ostringstream application;
application << contents.str() << "/" << "MacOS";
cmOStringStream resources;
std::ostringstream resources;
resources << contents.str() << "/" << "Resources";
// Install a required, user-provided bundle metadata file ...
cmOStringStream plist_source;
std::ostringstream plist_source;
plist_source << cpack_bundle_plist;
cmOStringStream plist_target;
std::ostringstream plist_target;
plist_target << contents.str() << "/" << "Info.plist";
if(!this->CopyFile(plist_source, plist_target))
......@@ -142,10 +142,10 @@ int cmCPackBundleGenerator::ConstructBundle()
}
// Install a user-provided bundle icon ...
cmOStringStream icon_source;
std::ostringstream icon_source;
icon_source << cpack_bundle_icon;
cmOStringStream icon_target;
std::ostringstream icon_target;
icon_target << resources.str() << "/" << cpack_bundle_name << ".icns";
if(!this->CopyFile(icon_source, icon_target))
......@@ -161,10 +161,10 @@ int cmCPackBundleGenerator::ConstructBundle()
// executable or a script) ...
if(!cpack_bundle_startup_command.empty())
{
cmOStringStream command_source;
std::ostringstream command_source;
command_source << cpack_bundle_startup_command;
cmOStringStream command_target;
std::ostringstream command_target;
command_target << application.str() << "/" << cpack_bundle_name;
if(!this->CopyFile(command_source, command_target))
......@@ -231,7 +231,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
for(std::vector<std::string>::iterator it = relFiles.begin();
it != relFiles.end(); ++it)
{
cmOStringStream temp_sign_file_cmd;
std::ostringstream temp_sign_file_cmd;
temp_sign_file_cmd << this->GetOption("CPACK_COMMAND_CODESIGN");
temp_sign_file_cmd << " --deep -f -s \"" << cpack_apple_cert_app;
temp_sign_file_cmd << "\" -i ";
......@@ -251,7 +251,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
}
// sign main binary
cmOStringStream temp_sign_binary_cmd;
std::ostringstream temp_sign_binary_cmd;
temp_sign_binary_cmd << this->GetOption("CPACK_COMMAND_CODESIGN");
temp_sign_binary_cmd << " --deep -f -s \"" << cpack_apple_cert_app;
temp_sign_binary_cmd << "\" \"" << bundle_path << "\"";
......@@ -266,7 +266,7 @@ int cmCPackBundleGenerator::SignBundle(const std::string& src_dir)
}
// sign app bundle
cmOStringStream temp_codesign_cmd;
std::ostringstream temp_codesign_cmd;
temp_codesign_cmd << this->GetOption("CPACK_COMMAND_CODESIGN");
temp_codesign_cmd << " --deep -f -s \"" << cpack_apple_cert_app << "\"";
if(this->GetOption("CPACK_BUNDLE_APPLE_ENTITLEMENTS"))
......
......@@ -169,8 +169,8 @@ int cmCPackDragNDropGenerator::PackageFiles()
}
//----------------------------------------------------------------------
bool cmCPackDragNDropGenerator::CopyFile(cmOStringStream& source,
cmOStringStream& target)
bool cmCPackDragNDropGenerator::CopyFile(std::ostringstream& source,
std::ostringstream& target)
{
if(!cmSystemTools::CopyFileIfDifferent(
source.str().c_str(),
......@@ -190,7 +190,7 @@ bool cmCPackDragNDropGenerator::CopyFile(cmOStringStream& source,
}
//----------------------------------------------------------------------
bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command,
bool cmCPackDragNDropGenerator::RunCommand(std::ostringstream& command,
std::string* output)
{
int exit_code = 1;
......@@ -255,12 +255,12 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// The staging directory contains everything that will end-up inside the
// final disk image ...
cmOStringStream staging;
std::ostringstream staging;
staging << src_dir;
// Add a symlink to /Applications so users can drag-and-drop the bundle
// into it
cmOStringStream application_link;
std::ostringstream application_link;
application_link << staging.str() << "/Applications";
cmSystemTools::CreateSymlink("/Applications",
application_link.str().c_str());
......@@ -268,10 +268,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Optionally add a custom volume icon ...
if(!cpack_package_icon.empty())
{
cmOStringStream package_icon_source;
std::ostringstream package_icon_source;
package_icon_source << cpack_package_icon;
cmOStringStream package_icon_destination;
std::ostringstream package_icon_destination;
package_icon_destination << staging.str() << "/.VolumeIcon.icns";
if(!this->CopyFile(package_icon_source, package_icon_destination))
......@@ -289,10 +289,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// (e.g. for setting background/layout) ...
if(!cpack_dmg_ds_store.empty())
{
cmOStringStream package_settings_source;
std::ostringstream package_settings_source;
package_settings_source << cpack_dmg_ds_store;
cmOStringStream package_settings_destination;
std::ostringstream package_settings_destination;
package_settings_destination << staging.str() << "/.DS_Store";
if(!this->CopyFile(package_settings_source, package_settings_destination))
......@@ -309,10 +309,10 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Optionally add a custom background image ...
if(!cpack_dmg_background_image.empty())
{
cmOStringStream package_background_source;
std::ostringstream package_background_source;
package_background_source << cpack_dmg_background_image;
cmOStringStream package_background_destination;
std::ostringstream package_background_destination;
package_background_destination << staging.str() << "/background.png";
if(!this->CopyFile(package_background_source,
......@@ -326,7 +326,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
return 0;
}
cmOStringStream temp_background_hiding_command;
std::ostringstream temp_background_hiding_command;
temp_background_hiding_command << this->GetOption("CPACK_COMMAND_SETFILE");
temp_background_hiding_command << " -a V \"";
temp_background_hiding_command << package_background_destination.str();
......@@ -346,7 +346,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::string temp_image = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
temp_image += "/temp.dmg";
cmOStringStream temp_image_command;
std::ostringstream temp_image_command;
temp_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
temp_image_command << " create";
temp_image_command << " -ov";
......@@ -368,9 +368,9 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Optionally set the custom icon flag for the image ...
if(!cpack_package_icon.empty())
{
cmOStringStream temp_mount;
std::ostringstream temp_mount;
cmOStringStream attach_command;
std::ostringstream attach_command;
attach_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
attach_command << " attach";
attach_command << " \"" << temp_image << "\"";
......@@ -389,7 +389,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
mountpoint_regex.find(attach_output.c_str());
temp_mount << mountpoint_regex.match(1);
cmOStringStream setfile_command;
std::ostringstream setfile_command;
setfile_command << this->GetOption("CPACK_COMMAND_SETFILE");
setfile_command << " -a C";
setfile_command << " \"" << temp_mount.str() << "\"";
......@@ -403,7 +403,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
return 0;
}
cmOStringStream detach_command;
std::ostringstream detach_command;
detach_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
detach_command << " detach";
detach_command << " \"" << temp_mount.str() << "\"";
......@@ -471,7 +471,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
std::string temp_udco = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
temp_udco += "/temp-udco.dmg";
cmOStringStream udco_image_command;
std::ostringstream udco_image_command;
udco_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
udco_image_command << " convert \"" << temp_image << "\"";
udco_image_command << " -format UDCO";
......@@ -488,7 +488,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
}
// unflatten dmg
cmOStringStream unflatten_command;
std::ostringstream unflatten_command;
unflatten_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
unflatten_command << " unflatten ";
unflatten_command << "\"" << temp_udco << "\"";
......@@ -503,7 +503,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
}
// Rez the SLA
cmOStringStream embed_sla_command;
std::ostringstream embed_sla_command;
embed_sla_command << this->GetOption("CPACK_COMMAND_REZ");
const char* sysroot = this->GetOption("CPACK_OSX_SYSROOT");
if(sysroot && sysroot[0] != '\0')
......@@ -524,7 +524,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
}
// flatten dmg
cmOStringStream flatten_command;
std::ostringstream flatten_command;
flatten_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
flatten_command << " flatten ";
flatten_command << "\"" << temp_udco << "\"";
......@@ -543,7 +543,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
// Create the final compressed read-only disk image ...
cmOStringStream final_image_command;
std::ostringstream final_image_command;
final_image_command << this->GetOption("CPACK_COMMAND_HDIUTIL");
final_image_command << " convert \"" << temp_image << "\"";
final_image_command << " -format ";
......
......@@ -33,8 +33,8 @@ protected:
bool SupportsComponentInstallation() const;
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
bool RunCommand(cmOStringStream& command, std::string* output = 0);
bool CopyFile(std::ostringstream& source, std::ostringstream& target);
bool RunCommand(std::ostringstream& command, std::string* output = 0);
std::string
GetComponentInstallDirNameSuffix(const std::string& componentName);
......
......@@ -160,7 +160,7 @@ int cmCPackGenerator::PrepareNames()
"Cannot open description file name: " << descFileName << std::endl);
return 0;
}
cmOStringStream ostr;
std::ostringstream ostr;
std::string line;
cmCPackLogger(cmCPackLog::LOG_VERBOSE,
......
......@@ -29,7 +29,7 @@
#define cmCPackLogger(logType, msg) \
do { \
cmOStringStream cmCPackLog_msg; \
std::ostringstream cmCPackLog_msg; \
cmCPackLog_msg << msg; \
this->Logger->Log(logType, __FILE__, __LINE__,\
cmCPackLog_msg.str().c_str());\
......
......@@ -17,7 +17,7 @@
#define cmCPack_Log(ctSelf, logType, msg) \
do { \
cmOStringStream cmCPackLog_msg; \
std::ostringstream cmCPackLog_msg; \
cmCPackLog_msg << msg; \
(ctSelf)->Log(logType, __FILE__, __LINE__, cmCPackLog_msg.str().c_str());\
} while ( 0 )
......
......@@ -71,7 +71,7 @@ int cmCPackNSISGenerator::PackageFiles()
tmpFile += "/NSISOutput.log";
std::string nsisInstallOptions = nsisFileName + "/NSIS.InstallOptions.ini";
nsisFileName += "/project.nsi";
cmOStringStream str;
std::ostringstream str;
std::vector<std::string>::const_iterator it;
for ( it = files.begin(); it != files.end(); ++ it )
{
......@@ -91,7 +91,7 @@ int cmCPackNSISGenerator::PackageFiles()
std::vector<std::string> dirs;
this->GetListOfSubdirectories(toplevel.c_str(), dirs);
std::vector<std::string>::const_iterator sit;
cmOStringStream dstr;
std::ostringstream dstr;
for ( sit = dirs.begin(); sit != dirs.end(); ++ sit )
{
std::string componentName;
......@@ -190,7 +190,7 @@ int cmCPackNSISGenerator::PackageFiles()
std::string groupDescriptions;
std::string installTypesCode;
std::string defines;
cmOStringStream macrosOut;
std::ostringstream macrosOut;
bool anyDownloadedComponents = false;
// Create installation types. The order is significant, so we first fill
......@@ -503,8 +503,8 @@ int cmCPackNSISGenerator::InitializeInternal()
<< "not set" << std::endl);
}
cmOStringStream str;
cmOStringStream deleteStr;
std::ostringstream str;
std::ostringstream deleteStr;
if ( cpackPackageExecutables )
{
......@@ -565,8 +565,8 @@ int cmCPackNSISGenerator::InitializeInternal()
}
//----------------------------------------------------------------------
void cmCPackNSISGenerator::CreateMenuLinks( cmOStringStream& str,
cmOStringStream& deleteStr)
void cmCPackNSISGenerator::CreateMenuLinks( std::ostringstream& str,
std::ostringstream& deleteStr)
{
const char* cpackMenuLinks
= this->GetOption("CPACK_NSIS_MENU_LINKS");
......@@ -694,7 +694,7 @@ bool cmCPackNSISGenerator::SupportsComponentInstallation() const
std::string
cmCPackNSISGenerator::
CreateComponentDescription(cmCPackComponent *component,
cmOStringStream& macrosOut)
std::ostringstream& macrosOut)
{
// Basic description of the component
std::string componentCode = "Section ";
......@@ -714,7 +714,7 @@ CreateComponentDescription(cmCPackComponent *component,
}
else if (!component->InstallationTypes.empty())
{
cmOStringStream out;
std::ostringstream out;
std::vector<cmCPackInstallationType *>::iterator installTypeIter;
for (installTypeIter = component->InstallationTypes.begin();
installTypeIter != component->InstallationTypes.end();
......@@ -734,7 +734,7 @@ CreateComponentDescription(cmCPackComponent *component,
// Compute the name of the archive.
std::string packagesDir = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
packagesDir += ".dummy";
cmOStringStream out;
std::ostringstream out;
out << cmSystemTools::GetFilenameWithoutLastExtension(packagesDir)
<< "-" << component->Name << ".zip";
component->ArchiveFile = out.str();
......@@ -859,7 +859,7 @@ CreateComponentDescription(cmCPackComponent *component,
{
totalSizeInKbytes = 1;
}
cmOStringStream out;
std::ostringstream out;
out << " AddSize " << totalSizeInKbytes << "\n"
<< " Push \"" << component->ArchiveFile << "\"\n"
<< " Call DownloadFile\n"
......@@ -935,7 +935,7 @@ std::string cmCPackNSISGenerator::CreateSelectionDependenciesDescription
}
visited.insert(component);
cmOStringStream out;
std::ostringstream out;
std::vector<cmCPackComponent *>::iterator dependIt;
for (dependIt = component->Dependencies.begin();
dependIt != component->Dependencies.end();
......@@ -967,7 +967,7 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription
}
visited.insert(component);
cmOStringStream out;
std::ostringstream out;
std::vector<cmCPackComponent *>::iterator dependIt;
for (dependIt = component->ReverseDependencies.begin();
dependIt != component->ReverseDependencies.end();
......@@ -992,7 +992,7 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription
std::string
cmCPackNSISGenerator::
CreateComponentGroupDescription(cmCPackComponentGroup *group,
cmOStringStream& macrosOut)
std::ostringstream& macrosOut)
{
if (group->Components.empty() && group->Subgroups.empty())
{
......
......@@ -38,8 +38,8 @@ public:
protected:
virtual int InitializeInternal();
void CreateMenuLinks( cmOStringStream& str,
cmOStringStream& deleteStr);
void CreateMenuLinks( std::ostringstream& str,
std::ostringstream& deleteStr);
int PackageFiles();
virtual const char* GetOutputExtension() { return ".exe"; }
virtual const char* GetOutputPostfix() { return "win32"; }
......@@ -56,7 +56,7 @@ protected:
/// macrosOut.
std::string
CreateComponentDescription(cmCPackComponent *component,
cmOStringStream& macrosOut);
std::ostringstream& macrosOut);
/// Produce NSIS code that selects all of the components that this component
/// depends on, recursively.
......@@ -75,7 +75,7 @@ protected:
/// added macros will be emitted via macrosOut.
std::string
CreateComponentGroupDescription(cmCPackComponentGroup *group,
cmOStringStream& macrosOut);
std::ostringstream& macrosOut);
/// Translations any newlines found in the string into \\r\\n, so that the
/// resulting string can be used within NSIS.
......
......@@ -45,8 +45,8 @@ int cmCPackOSXX11Generator::PackageFiles()
{
cmCPackLogger(cmCPackLog::LOG_DEBUG, "The cpackPackageExecutables: "
<< cpackPackageExecutables << "." << std::endl);
cmOStringStream str;
cmOStringStream deleteStr;
std::ostringstream str;
std::ostringstream deleteStr;
std::vector<std::string> cpackPackageExecutablesVector;
cmSystemTools::ExpandListArgument(cpackPackageExecutables,
cpackPackageExecutablesVector);
......@@ -165,7 +165,7 @@ int cmCPackOSXX11Generator::PackageFiles()
std::string output;
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/hdiutilOutput.log";
cmOStringStream dmgCmd;
std::ostringstream dmgCmd;
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
<< "\" create -ov -format UDZO -srcfolder \""
<< diskImageDirectory.c_str()
......
......@@ -325,7 +325,7 @@ int cmCPackPackageMakerGenerator::PackageFiles()
if (this->Components.empty())
{
// Use PackageMaker to build the package.
cmOStringStream pkgCmd;
std::ostringstream pkgCmd;
pkgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM")
<< "\" -build -p \"" << packageDirFileName << "\"";
if (this->Components.empty())
......@@ -359,7 +359,7 @@ int cmCPackPackageMakerGenerator::PackageFiles()
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/hdiutilOutput.log";
cmOStringStream dmgCmd;
std::ostringstream dmgCmd;
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
<< "\" create -ov -format UDZO -srcfolder \"" << packageDirFileName
<< "\" \"" << packageFileNames[0] << "\"";
......@@ -687,7 +687,7 @@ cmCPackPackageMakerGenerator::GetPackageName(const cmCPackComponent& component)
{
std::string packagesDir = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
packagesDir += ".dummy";
cmOStringStream out;
std::ostringstream out;
out << cmSystemTools::GetFilenameWithoutLastExtension(packagesDir)
<< "-" << component.Name << ".pkg";
return out.str();
......@@ -710,7 +710,7 @@ GenerateComponentPackage(const char *packageFile,
packageFile << std::endl);
// The command that will be used to run PackageMaker
cmOStringStream pkgCmd;
std::ostringstream pkgCmd;
if (this->PackageCompatibilityVersion < 10.5 ||
this->PackageMakerVersion < 3.0)
......@@ -800,7 +800,7 @@ WriteDistributionFile(const char* metapackageFile)
// Create the choice outline, which provides a tree-based view of
// the components in their groups.
cmOStringStream choiceOut;
std::ostringstream choiceOut;
choiceOut << "<choices-outline>" << std::endl;
// Emit the outline for the groups
......@@ -862,7 +862,8 @@ WriteDistributionFile(const char* metapackageFile)
//----------------------------------------------------------------------
void
cmCPackPackageMakerGenerator::
CreateChoiceOutline(const cmCPackComponentGroup& group, cmOStringStream& out)
CreateChoiceOutline(const cmCPackComponentGroup& group,
std::ostringstream& out)
{
out << "<line choice=\"" << group.Name << "Choice\">" << std::endl;
std::vector<cmCPackComponentGroup*>::const_iterator groupIt;
......@@ -885,7 +886,7 @@ CreateChoiceOutline(const cmCPackComponentGroup& group, cmOStringStream& out)
//----------------------------------------------------------------------
void
cmCPackPackageMakerGenerator::CreateChoice(const cmCPackComponentGroup& group,
cmOStringStream& out)
std::ostringstream& out)
{
out << "<choice id=\"" << group.Name << "Choice\" "
<< "title=\"" << group.DisplayName << "\" "
......@@ -903,7 +904,7 @@ cmCPackPackageMakerGenerator::CreateChoice(const cmCPackComponentGroup& group,
//----------------------------------------------------------------------
void
cmCPackPackageMakerGenerator::CreateChoice(const cmCPackComponent& component,
cmOStringStream& out)
std::ostringstream& out)
{
std::string packageId = "com.";
packageId += this->GetOption("CPACK_PACKAGE_VENDOR");
......@@ -989,7 +990,7 @@ void
cmCPackPackageMakerGenerator::
AddDependencyAttributes(const cmCPackComponent& component,
std::set<const cmCPackComponent *>& visited,
cmOStringStream& out)
std::ostringstream& out)
{
if (visited.find(&component) != visited.end())
{
......@@ -1013,7 +1014,7 @@ void
cmCPackPackageMakerGenerator::
AddReverseDependencyAttributes(const cmCPackComponent& component,
std::set<const cmCPackComponent *>& visited,
cmOStringStream& out)
std::ostringstream& out)
{
if (visited.find(&component) != visited.end())
{
......
......@@ -84,30 +84,30 @@ protected:
// dependency attributes for inter-component dependencies.
void AddDependencyAttributes(const cmCPackComponent& component,
std::set<const cmCPackComponent *>& visited,
cmOStringStream& out);
std::ostringstream& out);
// Subroutine of WriteDistributionFile that writes out the
// reverse dependency attributes for inter-component dependencies.
void
AddReverseDependencyAttributes(const cmCPackComponent& component,
std::set<const cmCPackComponent *>& visited,
cmOStringStream& out);
std::ostringstream& out);
// Generates XML that encodes the hierarchy of component groups and
// their components in a form that can be used by distribution
// metapackages.
void CreateChoiceOutline(const cmCPackComponentGroup& group,
cmOStringStream& out);
std::ostringstream& out);
/// Create the "choice" XML element to describe a component group
/// for the installer GUI.
void CreateChoice(const cmCPackComponentGroup& group,
cmOStringStream& out);
std::ostringstream& out);
/// Create the "choice" XML element to describe a component for the
/// installer GUI.
void CreateChoice(const cmCPackComponent& component,
cmOStringStream& out);
std::ostringstream& out);
// Escape the given string to make it usable as an XML attribute
// value.
......
......@@ -426,7 +426,7 @@ int main (int argc, char const* const* argv)
= mf->GetDefinition("CPACK_PACKAGE_VERSION_MINOR");
const char* projVersionPatch
= mf->GetDefinition("CPACK_PACKAGE_VERSION_PATCH");
cmOStringStream ostr;
std::ostringstream ostr;
ostr << projVersionMajor << "." << projVersionMinor << "."
<< projVersionPatch;
mf->AddDefinition("CPACK_PACKAGE_VERSION",
......
......@@ -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())
......
......@@ -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);
......
......@@ -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());
......
......@@ -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());
......
......@@ -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());