strings: simplify streaming sequences

This commit is contained in:
Ben Boeckel
2023-07-27 14:57:48 -04:00
parent a5ba00bdf8
commit 2409f62d18
3 changed files with 11 additions and 13 deletions

View File

@@ -103,11 +103,10 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile,
}
std::ostringstream command;
command << QuotePath(executable);
command << " -nologo"
command << QuotePath(executable)
<< " -nologo"
" -arch "
<< arch;
command << " -out " << QuotePath(objectFile);
<< arch << " -out " << QuotePath(objectFile);
for (std::string const& ext : CandleExtensions) {
command << " -ext " << QuotePath(ext);
@@ -132,8 +131,8 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
}
std::ostringstream command;
command << QuotePath(executable);
command << " -nologo"
command << QuotePath(executable)
<< " -nologo"
" -out "
<< QuotePath(CMakeToWixPath(packageFileNames.at(0)));

View File

@@ -286,8 +286,8 @@ void cmGlobalVisualStudioGenerator::ConfigureCMakeVisualStudioMacros()
if (!cmSystemTools::FileTimeCompare(src, dst, &res) || res > 0) {
if (!cmSystemTools::CopyFileAlways(src, dst)) {
std::ostringstream oss;
oss << "Could not copy from: " << src << std::endl;
oss << " to: " << dst << std::endl;
oss << "Could not copy from: " << src << std::endl
<< " to: " << dst << std::endl;
cmSystemTools::Message(oss.str(), "Warning");
}
}

View File

@@ -304,15 +304,14 @@ std::string cmVisualStudio10TargetGenerator::CalcCondition(
const std::string& config) const
{
std::ostringstream oss;
oss << "'$(Configuration)|$(Platform)'=='";
oss << config << "|" << this->Platform;
oss << "'";
oss << "'$(Configuration)|$(Platform)'=='" << config << "|" << this->Platform
<< "'";
// handle special case for 32 bit C# targets
if (this->ProjectType == VsProjectType::csproj &&
this->Platform == "Win32"_s) {
oss << " Or "
"'$(Configuration)|$(Platform)'=='";
oss << config
"'$(Configuration)|$(Platform)'=='"
<< config
<< "|x86"
"'";
}