summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-27 11:49:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-27 11:51:27 (GMT)
commitd6119e2305f1461699c5510c5d0ff9f7df798aed (patch)
treef4d411a02732ebfc97bccff472ee0558b1c31507 /Source/cmLocalUnixMakefileGenerator3.cxx
parenta6611577c33538af959348b49aec817dd9649c03 (diff)
parent3fdd8db3aaf4c804dd24a59913650ad024c8343e (diff)
downloadCMake-d6119e2305f1461699c5510c5d0ff9f7df798aed.zip
CMake-d6119e2305f1461699c5510c5d0ff9f7df798aed.tar.gz
CMake-d6119e2305f1461699c5510c5d0ff9f7df798aed.tar.bz2
Merge topic 'cleanup-endls-1'
3fdd8db3aa Refactor: Avoid `std::endl` where it's not necessary (part 1) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4513
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx28
1 files changed, 12 insertions, 16 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 6caf816..593a6d9 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1326,10 +1326,9 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
int result;
if (!ftc->Compare(internalDependFile, tgtInfo, &result) || result < 0) {
if (verbose) {
- std::ostringstream msg;
- msg << "Dependee \"" << tgtInfo << "\" is newer than depender \""
- << internalDependFile << "\"." << std::endl;
- cmSystemTools::Stdout(msg.str());
+ cmSystemTools::Stdout(cmStrCat("Dependee \"", tgtInfo,
+ "\" is newer than depender \"",
+ internalDependFile, "\".\n"));
}
needRescanDependInfo = true;
}
@@ -1346,10 +1345,9 @@ bool cmLocalUnixMakefileGenerator3::UpdateDependencies(
if (!ftc->Compare(internalDependFile, dirInfoFile, &result) ||
result < 0) {
if (verbose) {
- std::ostringstream msg;
- msg << "Dependee \"" << dirInfoFile << "\" is newer than depender \""
- << internalDependFile << "\"." << std::endl;
- cmSystemTools::Stdout(msg.str());
+ cmSystemTools::Stdout(cmStrCat("Dependee \"", dirInfoFile,
+ "\" is newer than depender \"",
+ internalDependFile, "\".\n"));
}
needRescanDirInfo = true;
}
@@ -1515,11 +1513,9 @@ void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose)
if (cmSystemTools::FileExists(dependee) &&
!cmSystemTools::FileExists(depender)) {
if (verbose) {
- std::ostringstream msg;
- msg << "Deleting primary custom command output \"" << dependee
- << "\" because another output \"" << depender
- << "\" does not exist." << std::endl;
- cmSystemTools::Stdout(msg.str());
+ cmSystemTools::Stdout(cmStrCat(
+ "Deleting primary custom command output \"", dependee,
+ "\" because another output \"", depender, "\" does not exist.\n"));
}
cmSystemTools::RemoveFile(dependee);
}
@@ -1966,7 +1962,7 @@ std::string cmLocalUnixMakefileGenerator3::GetRecursiveMakeCall(
void cmLocalUnixMakefileGenerator3::WriteDivider(std::ostream& os)
{
os << "#======================================"
- << "=======================================\n";
+ "=======================================\n";
}
void cmLocalUnixMakefileGenerator3::WriteCMakeArgument(std::ostream& os,
@@ -1974,7 +1970,7 @@ void cmLocalUnixMakefileGenerator3::WriteCMakeArgument(std::ostream& os,
{
// Write the given string to the stream with escaping to get it back
// into CMake through the lexical scanner.
- os << "\"";
+ os << '"';
for (char c : s) {
if (c == '\\') {
os << "\\\\";
@@ -1984,7 +1980,7 @@ void cmLocalUnixMakefileGenerator3::WriteCMakeArgument(std::ostream& os,
os << c;
}
}
- os << "\"";
+ os << '"';
}
std::string cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(