This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  89479bde949b1ac33c37953ed768cd85b7d8109d (commit)
       via  37c671570c4b344d66eb522ab2b63686550f993b (commit)
       via  7fe3e874d59fb054a092738884157153c5550efc (commit)
       via  74f2c0ea56fa3b9dce539fe8cbe0f0f7690b658d (commit)
       via  7c2767ef3b575bc4b27d4d57ab9f2d5d1acbd3ce (commit)
       via  303e81343804d5ef271a3669c1e6cac558055ca1 (commit)
       via  51565abe7929f4baf5772345dc8d9c62ece9cf7a (commit)
       via  b1cfaf7b91f87fed0c70a6a7763d565023420788 (commit)
       via  3f4c4e7afe6075b18f99c67cf808e2300b3690c4 (commit)
       via  a8ca5aea946e1154b4518ba28db3f4e695dbf165 (commit)
       via  3b2b02825d88a045d08b8295927652cbcff408a8 (commit)
       via  a7aade84198343af9de79fda5c37560a2f9531a4 (commit)
       via  f6211f57d6b350dd8d701c19f80a0a458203e909 (commit)
      from  8685d0d2911f01fb7e2d26a2fd904dbf73712ce4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89479bde949b1ac33c37953ed768cd85b7d8109d
commit 89479bde949b1ac33c37953ed768cd85b7d8109d
Merge: 37c6715 7fe3e87
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Aug 26 14:46:11 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Aug 26 10:51:11 2019 -0400

    Merge topic 'pvs-cleanup'
    
    7fe3e874d5 cmCPackLog: Fix support for multiple log message tags
    74f2c0ea56 cmCTestTestHandler: Remove extra layer of parentheses
    7c2767ef3b cmCTestMultiProcessHandler: Explain testRun ownership in comments
    303e813438 CTest: Simplify some boolean conditions
    51565abe79 cmMessageCommand: Remove extra layer of parentheses
    b1cfaf7b91 cmVSSetupHelper: Remove unused SmartBSTR copy operations
    3f4c4e7afe cmVSSetupHelper: Fix SmartBSTR copy operations
    a8ca5aea94 cmMakefileTargetGenerator: Check for null before using a pointer
    ...
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Acked-by: Daniel Pfeifer <dan...@pfeifer-mail.de>
    Acked-by: Artalus <artalus-m...@yandex.ru>
    Merge-request: !3715


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37c671570c4b344d66eb522ab2b63686550f993b
commit 37c671570c4b344d66eb522ab2b63686550f993b
Merge: 8685d0d 3b2b028
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Aug 26 14:37:11 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Aug 26 10:49:10 2019 -0400

    Merge topic 'source_sweep_ostringstream_single'
    
    3b2b02825d Source sweep: Replace std::ostringstream when used with a single 
append
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3726


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7fe3e874d59fb054a092738884157153c5550efc
commit 7fe3e874d59fb054a092738884157153c5550efc
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 11:36:49 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:46 2019 -0400

    cmCPackLog: Fix support for multiple log message tags
    
    Fix logic from commit bbf1c2d275 (ENH: More improvements and add
    logging, 2006-01-02, v2.4.0~712) to append to the accumulated tag string
    instead of overwriting it for each type of message.
    
    Issue: #19610

diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx
index a3ca4b5..ca675fd 100644
--- a/Source/CPack/cmCPackLog.cxx
+++ b/Source/CPack/cmCPackLog.cxx
@@ -83,7 +83,7 @@ void cmCPackLog::Log(int tag, const char* file, int line, 
const char* msg,
       if (!tagString.empty()) {
         tagString += ",";
       }
-      tagString = "VERBOSE";
+      tagString += "VERBOSE";
     }
   }
   if (tag & LOG_WARNING) {
@@ -93,7 +93,7 @@ void cmCPackLog::Log(int tag, const char* file, int line, 
const char* msg,
       if (!tagString.empty()) {
         tagString += ",";
       }
-      tagString = "WARNING";
+      tagString += "WARNING";
     }
   }
   if (tag & LOG_ERROR) {
@@ -103,7 +103,7 @@ void cmCPackLog::Log(int tag, const char* file, int line, 
const char* msg,
       if (!tagString.empty()) {
         tagString += ",";
       }
-      tagString = "ERROR";
+      tagString += "ERROR";
     }
   }
   if (tag & LOG_DEBUG && this->Debug) {
@@ -113,7 +113,7 @@ void cmCPackLog::Log(int tag, const char* file, int line, 
const char* msg,
       if (!tagString.empty()) {
         tagString += ",";
       }
-      tagString = "DEBUG";
+      tagString += "DEBUG";
     }
     useFileAndLine = true;
   }
@@ -124,7 +124,7 @@ void cmCPackLog::Log(int tag, const char* file, int line, 
const char* msg,
       if (!tagString.empty()) {
         tagString += ",";
       }
-      tagString = "VERBOSE";
+      tagString += "VERBOSE";
     }
   }
   if (this->Quiet) {

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74f2c0ea56fa3b9dce539fe8cbe0f0f7690b658d
commit 74f2c0ea56fa3b9dce539fe8cbe0f0f7690b658d
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 11:05:55 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:46 2019 -0400

    cmCTestTestHandler: Remove extra layer of parentheses
    
    A condition in `ComputeTestListForRerunFailed` contained an extra layer
    of parentheses.  Remove them.  The condition itself is correct because
    an empty list means "all tests" so we want to include the current test.
    
    Issue: #19610

diff --git a/Source/CTest/cmCTestTestHandler.cxx 
b/Source/CTest/cmCTestTestHandler.cxx
index 8430ef4..db214e1 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -893,7 +893,7 @@ void cmCTestTestHandler::ComputeTestListForRerunFailed()
     cnt++;
 
     // if this test is not in our list of tests to run, then skip it.
-    if ((!this->TestsToRun.empty() && !cmContains(TestsToRun, cnt))) {
+    if (!this->TestsToRun.empty() && !cmContains(this->TestsToRun, cnt)) {
       continue;
     }
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7c2767ef3b575bc4b27d4d57ab9f2d5d1acbd3ce
commit 7c2767ef3b575bc4b27d4d57ab9f2d5d1acbd3ce
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 11:52:41 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:46 2019 -0400

    cmCTestMultiProcessHandler: Explain testRun ownership in comments
    
    The ownership semantics of the 'testRun' variable are subtle and
    may fool static analysers.  Add comments explaining them for now.
    Later some refactoring could be done to clarify the code.
    
    Issue: #19610

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx 
b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 2d07420..21d5595 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -189,10 +189,13 @@ bool cmCTestMultiProcessHandler::StartTestProcess(int 
test)
                           std::strerror(workdir.GetLastResult()));
   } else {
     if (testRun->StartTest(this->Completed, this->Total)) {
+      // Ownership of 'testRun' has moved to another structure.
+      // When the test finishes, FinishTestProcess will be called.
       return true;
     }
   }
 
+  // Pass ownership of 'testRun'.
   this->FinishTestProcess(testRun, false);
   return false;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=303e81343804d5ef271a3669c1e6cac558055ca1
commit 303e81343804d5ef271a3669c1e6cac558055ca1
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 11:32:54 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:46 2019 -0400

    CTest: Simplify some boolean conditions
    
    Directly compare two boolean values instead of spelling out accepted
    combinations.
    
    Issue: #19610

diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index fb91322..d232c23 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -148,8 +148,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t 
total, bool started)
       this->TestResult.CompletionStatus = s.str();
       cmCTestLog(this->CTest, HANDLER_OUTPUT, "***Skipped ");
       skipped = true;
-    } else if ((success && !this->TestProperties->WillFail) ||
-               (!success && this->TestProperties->WillFail)) {
+    } else if (success != this->TestProperties->WillFail) {
       this->TestResult.Status = cmCTestTestHandler::COMPLETED;
       outputStream << "   Passed  ";
     } else {
diff --git a/Source/CTest/cmCTestTestHandler.cxx 
b/Source/CTest/cmCTestTestHandler.cxx
index 7ae0d26..8430ef4 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -700,8 +700,7 @@ void cmCTestTestHandler::PrintLabelOrSubprojectSummary(bool 
doSubProject)
       }
       // if we are doing sub projects and this label is one, then use it
       // if we are not doing sub projects and the label is not one use it
-      if ((doSubProject && isSubprojectLabel) ||
-          (!doSubProject && !isSubprojectLabel)) {
+      if (doSubProject == isSubprojectLabel) {
         if (l.size() > maxlen) {
           maxlen = l.size();
         }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51565abe7929f4baf5772345dc8d9c62ece9cf7a
commit 51565abe7929f4baf5772345dc8d9c62ece9cf7a
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 11:26:35 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:46 2019 -0400

    cmMessageCommand: Remove extra layer of parentheses
    
    The logic checking `CMAKE_WARN_DEPRECATED` contained an unnecessary
    layer of parentheses.  The condition is of the form `!IsSet || IsOn`
    which is correct because the documentation says that the behavior is
    enabled unless the variable is explicitly set to a false value.
    
    Issue: #19610

diff --git a/Source/cmMessageCommand.cxx b/Source/cmMessageCommand.cxx
index 3f33312..39b40b8 100644
--- a/Source/cmMessageCommand.cxx
+++ b/Source/cmMessageCommand.cxx
@@ -70,8 +70,8 @@ bool cmMessageCommand(std::vector<std::string> const& args,
       fatal = true;
       type = MessageType::DEPRECATION_ERROR;
       level = cmake::LogLevel::LOG_ERROR;
-    } else if ((!status.GetMakefile().IsSet("CMAKE_WARN_DEPRECATED") ||
-                status.GetMakefile().IsOn("CMAKE_WARN_DEPRECATED"))) {
+    } else if (!status.GetMakefile().IsSet("CMAKE_WARN_DEPRECATED") ||
+               status.GetMakefile().IsOn("CMAKE_WARN_DEPRECATED")) {
       type = MessageType::DEPRECATION_WARNING;
       level = cmake::LogLevel::LOG_WARNING;
     } else {

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b1cfaf7b91f87fed0c70a6a7763d565023420788
commit b1cfaf7b91f87fed0c70a6a7763d565023420788
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 11:21:04 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:45 2019 -0400

    cmVSSetupHelper: Remove unused SmartBSTR copy operations
    
    For our use case we do not actually need to copy these.
    Mark the operations as `= delete` to simplify the code.

diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h
index 9382c05..ad46c75 100644
--- a/Source/cmVSSetupHelper.h
+++ b/Source/cmVSSetupHelper.h
@@ -74,28 +74,8 @@ class SmartBSTR
 {
 public:
   SmartBSTR() { str = NULL; }
-  SmartBSTR(const SmartBSTR& src)
-  {
-    if (src.str != NULL) {
-      str =
-        ::SysAllocStringByteLen((char*)src.str, ::SysStringByteLen(src.str));
-    } else {
-      str = ::SysAllocStringByteLen(NULL, 0);
-    }
-  }
-  SmartBSTR& operator=(const SmartBSTR& src)
-  {
-    if (str != src.str) {
-      ::SysFreeString(str);
-      if (src.str != NULL) {
-        str =
-          ::SysAllocStringByteLen((char*)src.str, ::SysStringByteLen(src.str));
-      } else {
-        str = ::SysAllocStringByteLen(NULL, 0);
-      }
-    }
-    return *this;
-  }
+  SmartBSTR(const SmartBSTR& src) = delete;
+  SmartBSTR& operator=(const SmartBSTR& src) = delete;
   operator BSTR() const { return str; }
   BSTR* operator&() throw() { return &str; }
   ~SmartBSTR() throw() { ::SysFreeString(str); }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f4c4e7afe6075b18f99c67cf808e2300b3690c4
commit 3f4c4e7afe6075b18f99c67cf808e2300b3690c4
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 10:56:55 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:45 2019 -0400

    cmVSSetupHelper: Fix SmartBSTR copy operations
    
    Fix the SmartBSTR copy constructor and copy assignment operator added by
    commit 18c8278b62 (VS: Add helper class to interact with Visual Studio
    Installer, 2016-12-14, v3.8.0-rc1~93^2~4) to use the string from the
    source of the copy.
    
    Issue: #19610

diff --git a/Source/cmVSSetupHelper.h b/Source/cmVSSetupHelper.h
index 1bda54a..9382c05 100644
--- a/Source/cmVSSetupHelper.h
+++ b/Source/cmVSSetupHelper.h
@@ -77,7 +77,8 @@ public:
   SmartBSTR(const SmartBSTR& src)
   {
     if (src.str != NULL) {
-      str = ::SysAllocStringByteLen((char*)str, ::SysStringByteLen(str));
+      str =
+        ::SysAllocStringByteLen((char*)src.str, ::SysStringByteLen(src.str));
     } else {
       str = ::SysAllocStringByteLen(NULL, 0);
     }
@@ -87,7 +88,8 @@ public:
     if (str != src.str) {
       ::SysFreeString(str);
       if (src.str != NULL) {
-        str = ::SysAllocStringByteLen((char*)str, ::SysStringByteLen(str));
+        str =
+          ::SysAllocStringByteLen((char*)src.str, ::SysStringByteLen(src.str));
       } else {
         str = ::SysAllocStringByteLen(NULL, 0);
       }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a8ca5aea946e1154b4518ba28db3f4e695dbf165
commit a8ca5aea946e1154b4518ba28db3f4e695dbf165
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 10:51:12 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Aug 26 09:43:36 2019 -0400

    cmMakefileTargetGenerator: Check for null before using a pointer
    
    Fix the order of logic added by commit 7740ccd1a4 (ENH: some cleanup of
    the makefile generator, 2006-02-14, v2.4.0~517) to check for allocation
    failure ('new' returns null) before using the pointer.
    
    Issue: #19610

diff --git a/Source/cmMakefileTargetGenerator.cxx 
b/Source/cmMakefileTargetGenerator.cxx
index f35df32..0f13540 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -131,10 +131,10 @@ void cmMakefileTargetGenerator::CreateRuleFile()
   this->BuildFileStream =
     new cmGeneratedFileStream(this->BuildFileNameFull, false,
                               this->GlobalGenerator->GetMakefileEncoding());
-  this->BuildFileStream->SetCopyIfDifferent(true);
   if (!this->BuildFileStream) {
     return;
   }
+  this->BuildFileStream->SetCopyIfDifferent(true);
   this->LocalGenerator->WriteDisclaimer(*this->BuildFileStream);
   if (this->GlobalGenerator->AllowDeleteOnError()) {
     std::vector<std::string> no_depends;
@@ -300,10 +300,10 @@ void cmMakefileTargetGenerator::WriteCommonCodeRules()
   this->FlagFileStream =
     new cmGeneratedFileStream(this->FlagFileNameFull, false,
                               this->GlobalGenerator->GetMakefileEncoding());
-  this->FlagFileStream->SetCopyIfDifferent(true);
   if (!this->FlagFileStream) {
     return;
   }
+  this->FlagFileStream->SetCopyIfDifferent(true);
   this->LocalGenerator->WriteDisclaimer(*this->FlagFileStream);
 
   // Include the flags for the target.
@@ -1033,10 +1033,10 @@ void cmMakefileTargetGenerator::WriteTargetDependRules()
   this->InfoFileNameFull =
     this->LocalGenerator->ConvertToFullPath(this->InfoFileNameFull);
   this->InfoFileStream = new cmGeneratedFileStream(this->InfoFileNameFull);
-  this->InfoFileStream->SetCopyIfDifferent(true);
-  if (!*this->InfoFileStream) {
+  if (!this->InfoFileStream) {
     return;
   }
+  this->InfoFileStream->SetCopyIfDifferent(true);
   this->LocalGenerator->WriteDependLanguageInfo(*this->InfoFileStream,
                                                 this->GeneratorTarget);
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b2b02825d88a045d08b8295927652cbcff408a8
commit 3b2b02825d88a045d08b8295927652cbcff408a8
Author:     Sebastian Holtermann <sebh...@xwmw.org>
AuthorDate: Fri Aug 23 12:21:46 2019 +0200
Commit:     Sebastian Holtermann <sebh...@xwmw.org>
CommitDate: Fri Aug 23 18:52:33 2019 +0200

    Source sweep: Replace std::ostringstream when used with a single append
    
    This replaces `std::ostringstream`, when it is written to only once.
    If the single written argument was numeric, `std::to_string` is used 
instead.
    Otherwise, the single written argument is used directly instead of the
    `std::ostringstream::str()` invocation.

diff --git a/Source/CPack/cmCPackBundleGenerator.cxx 
b/Source/CPack/cmCPackBundleGenerator.cxx
index f58cc0a..fb3f22f 100644
--- a/Source/CPack/cmCPackBundleGenerator.cxx
+++ b/Source/CPack/cmCPackBundleGenerator.cxx
@@ -89,11 +89,10 @@ int cmCPackBundleGenerator::ConstructBundle()
 
   // The staging directory contains everything that will end-up inside the
   // final disk image ...
-  std::ostringstream staging;
-  staging << toplevel;
+  std::string const staging = toplevel;
 
   std::ostringstream contents;
-  contents << staging.str() << "/" << cpack_bundle_name << ".app/"
+  contents << staging << "/" << cpack_bundle_name << ".app/"
            << "Contents";
 
   std::ostringstream application;
diff --git a/Source/CTest/cmCTestBuildCommand.cxx 
b/Source/CTest/cmCTestBuildCommand.cxx
index 6e76f08..cb22fa6 100644
--- a/Source/CTest/cmCTestBuildCommand.cxx
+++ b/Source/CTest/cmCTestBuildCommand.cxx
@@ -154,16 +154,15 @@ 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]) {
-    std::ostringstream str;
-    str << this->Handler->GetTotalErrors();
-    this->Makefile->AddDefinition(this->Values[ctb_NUMBER_ERRORS], str.str());
+    this->Makefile->AddDefinition(
+      this->Values[ctb_NUMBER_ERRORS],
+      std::to_string(this->Handler->GetTotalErrors()));
   }
   if (this->Values[ctb_NUMBER_WARNINGS] &&
       *this->Values[ctb_NUMBER_WARNINGS]) {
-    std::ostringstream str;
-    str << this->Handler->GetTotalWarnings();
-    this->Makefile->AddDefinition(this->Values[ctb_NUMBER_WARNINGS],
-                                  str.str());
+    this->Makefile->AddDefinition(
+      this->Values[ctb_NUMBER_WARNINGS],
+      std::to_string(this->Handler->GetTotalWarnings()));
   }
   return ret;
 }
diff --git a/Source/CTest/cmCTestHandlerCommand.cxx 
b/Source/CTest/cmCTestHandlerCommand.cxx
index 8ceca08..6add717 100644
--- a/Source/CTest/cmCTestHandlerCommand.cxx
+++ b/Source/CTest/cmCTestHandlerCommand.cxx
@@ -228,9 +228,8 @@ bool 
cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
 
   int res = handler->ProcessHandler();
   if (this->Values[ct_RETURN_VALUE] && *this->Values[ct_RETURN_VALUE]) {
-    std::ostringstream str;
-    str << res;
-    this->Makefile->AddDefinition(this->Values[ct_RETURN_VALUE], str.str());
+    this->Makefile->AddDefinition(this->Values[ct_RETURN_VALUE],
+                                  std::to_string(res));
   }
   this->ProcessAdditionalValues(handler);
   // log the error message if there was an error
diff --git a/Source/CTest/cmCTestMemCheckCommand.cxx 
b/Source/CTest/cmCTestMemCheckCommand.cxx
index d7d42bf..804efa5 100644
--- a/Source/CTest/cmCTestMemCheckCommand.cxx
+++ b/Source/CTest/cmCTestMemCheckCommand.cxx
@@ -2,7 +2,7 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmCTestMemCheckCommand.h"
 
-#include <sstream>
+#include <string>
 #include <vector>
 
 #include "cmCTest.h"
@@ -44,8 +44,9 @@ void cmCTestMemCheckCommand::ProcessAdditionalValues(
   cmCTestGenericHandler* handler)
 {
   if (this->Values[ctm_DEFECT_COUNT] && *this->Values[ctm_DEFECT_COUNT]) {
-    std::ostringstream str;
-    str << static_cast<cmCTestMemCheckHandler*>(handler)->GetDefectCount();
-    this->Makefile->AddDefinition(this->Values[ctm_DEFECT_COUNT], str.str());
+    this->Makefile->AddDefinition(
+      this->Values[ctm_DEFECT_COUNT],
+      std::to_string(
+        static_cast<cmCTestMemCheckHandler*>(handler)->GetDefectCount()));
   }
 }
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx 
b/Source/CTest/cmCTestMemCheckHandler.cxx
index b09e7bb..259240f 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -1074,10 +1074,7 @@ void 
cmCTestMemCheckHandler::AppendMemTesterOutput(cmCTestTestResult& res,
 void cmCTestMemCheckHandler::TestOutputFileNames(
   int test, std::vector<std::string>& files)
 {
-  std::string index;
-  std::ostringstream stream;
-  stream << test;
-  index = stream.str();
+  std::string index = std::to_string(test);
   std::string ofile = this->MemoryTesterOutputFile;
   std::string::size_type pos = ofile.find("??");
   ofile.replace(pos, 2, index);
diff --git a/Source/CTest/cmCTestRunScriptCommand.cxx 
b/Source/CTest/cmCTestRunScriptCommand.cxx
index c03cffd..f59ca57 100644
--- a/Source/CTest/cmCTestRunScriptCommand.cxx
+++ b/Source/CTest/cmCTestRunScriptCommand.cxx
@@ -5,8 +5,6 @@
 #include "cmCTestScriptHandler.h"
 #include "cmMakefile.h"
 
-#include <sstream>
-
 class cmExecutionStatus;
 
 bool cmCTestRunScriptCommand::InitialPass(std::vector<std::string> const& args,
@@ -41,9 +39,7 @@ bool 
cmCTestRunScriptCommand::InitialPass(std::vector<std::string> const& args,
       int ret;
       cmCTestScriptHandler::RunScript(this->CTest, this->Makefile,
                                       args[i].c_str(), !np, &ret);
-      std::ostringstream str;
-      str << ret;
-      this->Makefile->AddDefinition(returnVariable, str.str());
+      this->Makefile->AddDefinition(returnVariable, std::to_string(ret));
     }
   }
   return true;
diff --git a/Source/cmAddExecutableCommand.cxx 
b/Source/cmAddExecutableCommand.cxx
index 59d6be3..f1264d5 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -93,9 +93,7 @@ bool cmAddExecutableCommand(std::vector<std::string> const& 
args,
       return false;
     }
     if (args.size() != 3) {
-      std::ostringstream e;
-      e << "ALIAS requires exactly one target argument.";
-      status.SetError(e.str());
+      status.SetError("ALIAS requires exactly one target argument.");
       return false;
     }
 
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx
index 46fc61d..c067aea 100644
--- a/Source/cmAddLibraryCommand.cxx
+++ b/Source/cmAddLibraryCommand.cxx
@@ -49,9 +49,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args,
     std::string libType = *s;
     if (libType == "STATIC") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting STATIC type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting STATIC type.");
         return false;
       }
       ++s;
@@ -59,9 +58,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args,
       haveSpecifiedType = true;
     } else if (libType == "SHARED") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting SHARED type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting SHARED type.");
         return false;
       }
       ++s;
@@ -69,9 +67,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args,
       haveSpecifiedType = true;
     } else if (libType == "MODULE") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting MODULE type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting MODULE type.");
         return false;
       }
       ++s;
@@ -79,9 +76,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args,
       haveSpecifiedType = true;
     } else if (libType == "OBJECT") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting OBJECT type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting OBJECT type.");
         return false;
       }
       ++s;
@@ -89,9 +85,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args,
       haveSpecifiedType = true;
     } else if (libType == "UNKNOWN") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting UNKNOWN type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting UNKNOWN type.");
         return false;
       }
       ++s;
@@ -99,30 +94,26 @@ bool cmAddLibraryCommand(std::vector<std::string> const& 
args,
       haveSpecifiedType = true;
     } else if (libType == "ALIAS") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting ALIAS type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting ALIAS type.");
         return false;
       }
       ++s;
       isAlias = true;
     } else if (libType == "INTERFACE") {
       if (haveSpecifiedType) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting/multiple types.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting/multiple types.");
         return false;
       }
       if (isAlias) {
-        std::ostringstream e;
-        e << "INTERFACE library specified with conflicting ALIAS type.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library specified with conflicting ALIAS type.");
         return false;
       }
       if (excludeFromAll) {
-        std::ostringstream e;
-        e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library may not be used with EXCLUDE_FROM_ALL.");
         return false;
       }
       ++s;
@@ -130,9 +121,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& 
args,
       haveSpecifiedType = true;
     } else if (*s == "EXCLUDE_FROM_ALL") {
       if (type == cmStateEnums::INTERFACE_LIBRARY) {
-        std::ostringstream e;
-        e << "INTERFACE library may not be used with EXCLUDE_FROM_ALL.";
-        status.SetError(e.str());
+        status.SetError(
+          "INTERFACE library may not be used with EXCLUDE_FROM_ALL.");
         return false;
       }
       ++s;
@@ -144,9 +134,8 @@ bool cmAddLibraryCommand(std::vector<std::string> const& 
args,
       ++s;
       importGlobal = true;
     } else if (type == cmStateEnums::INTERFACE_LIBRARY && *s == "GLOBAL") {
-      std::ostringstream e;
-      e << "GLOBAL option may only be used with IMPORTED libraries.";
-      status.SetError(e.str());
+      status.SetError(
+        "GLOBAL option may only be used with IMPORTED libraries.");
       return false;
     } else {
       break;
@@ -155,15 +144,12 @@ bool cmAddLibraryCommand(std::vector<std::string> const& 
args,
 
   if (type == cmStateEnums::INTERFACE_LIBRARY) {
     if (s != args.end()) {
-      std::ostringstream e;
-      e << "INTERFACE library requires no source arguments.";
-      status.SetError(e.str());
+      status.SetError("INTERFACE library requires no source arguments.");
       return false;
     }
     if (importGlobal && !importTarget) {
-      std::ostringstream e;
-      e << "INTERFACE library specified as GLOBAL, but not as IMPORTED.";
-      status.SetError(e.str());
+      status.SetError(
+        "INTERFACE library specified as GLOBAL, but not as IMPORTED.");
       return false;
     }
   }
@@ -192,9 +178,7 @@ bool cmAddLibraryCommand(std::vector<std::string> const& 
args,
       return false;
     }
     if (args.size() != 3) {
-      std::ostringstream e;
-      e << "ALIAS requires exactly one target argument.";
-      status.SetError(e.str());
+      status.SetError("ALIAS requires exactly one target argument.");
       return false;
     }
 
diff --git a/Source/cmCMakeHostSystemInformationCommand.cxx 
b/Source/cmCMakeHostSystemInformationCommand.cxx
index 1669853..974b984 100644
--- a/Source/cmCMakeHostSystemInformationCommand.cxx
+++ b/Source/cmCMakeHostSystemInformationCommand.cxx
@@ -2,7 +2,6 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmCMakeHostSystemInformationCommand.h"
 
-#include <sstream>
 #include <stddef.h>
 
 #include "cmExecutionStatus.h"
@@ -183,9 +182,7 @@ bool GetValue(cmExecutionStatus& status, 
cmsys::SystemInformation& info,
 
 std::string ValueToString(size_t value)
 {
-  std::ostringstream tmp;
-  tmp << value;
-  return tmp.str();
+  return std::to_string(value);
 }
 
 std::string ValueToString(const char* value)
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 866d262..123c646 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1218,9 +1218,7 @@ int cmCTest::RunTest(std::vector<const char*> argv, 
std::string* output,
             timeout != cmCTest::MaxDuration() &&
             timeout > cmDuration::zero()) {
           args.emplace_back("--test-timeout");
-          std::ostringstream msg;
-          msg << cmDurationTo<unsigned int>(timeout);
-          args.push_back(msg.str());
+          args.push_back(std::to_string(cmDurationTo<unsigned int>(timeout)));
         }
         args.emplace_back(i);
       }
diff --git a/Source/cmCommandArgumentParserHelper.cxx 
b/Source/cmCommandArgumentParserHelper.cxx
index 073a0cd..b368b3a 100644
--- a/Source/cmCommandArgumentParserHelper.cxx
+++ b/Source/cmCommandArgumentParserHelper.cxx
@@ -88,9 +88,7 @@ const char* 
cmCommandArgumentParserHelper::ExpandVariable(const char* var)
     return nullptr;
   }
   if (this->FileLine >= 0 && strcmp(var, "CMAKE_CURRENT_LIST_LINE") == 0) {
-    std::ostringstream ostr;
-    ostr << this->FileLine;
-    return this->AddString(ostr.str());
+    return this->AddString(std::to_string(this->FileLine));
   }
   const char* value = this->Makefile->GetDefinition(var);
   if (!value) {
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 96733f2..8c69337 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -843,9 +843,7 @@ void cmExportFileGenerator::SetImportDetailProperties(
     if (iface->Multiplicity > 0) {
       std::string prop =
         cmStrCat("IMPORTED_LINK_INTERFACE_MULTIPLICITY", suffix);
-      std::ostringstream m;
-      m << iface->Multiplicity;
-      properties[prop] = m.str();
+      properties[prop] = std::to_string(iface->Multiplicity);
     }
   }
 
diff --git a/Source/cmFileCopier.cxx b/Source/cmFileCopier.cxx
index 3156c95..38a6080 100644
--- a/Source/cmFileCopier.cxx
+++ b/Source/cmFileCopier.cxx
@@ -446,9 +446,8 @@ bool cmFileCopier::Install(const std::string& fromFile,
                            const std::string& toFile)
 {
   if (fromFile.empty()) {
-    std::ostringstream e;
-    e << "INSTALL encountered an empty string input file name.";
-    this->Status.SetError(e.str());
+    this->Status.SetError(
+      "INSTALL encountered an empty string input file name.");
     return false;
   }
 
diff --git a/Source/cmFunctionCommand.cxx b/Source/cmFunctionCommand.cxx
index e8f03d7..9420541 100644
--- a/Source/cmFunctionCommand.cxx
+++ b/Source/cmFunctionCommand.cxx
@@ -62,9 +62,7 @@ bool cmFunctionHelperCommand::operator()(
                                             this->Policies);
 
   // set the value of argc
-  std::ostringstream strStream;
-  strStream << expandedArgs.size();
-  makefile.AddDefinition("ARGC", strStream.str());
+  makefile.AddDefinition("ARGC", std::to_string(expandedArgs.size()));
   makefile.MarkVariableAsUsed("ARGC");
 
   // set the values for ARGV0 ARGV1 ...
diff --git a/Source/cmGeneratorExpressionNode.cxx 
b/Source/cmGeneratorExpressionNode.cxx
index 9a4e13e..dda4776 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -684,10 +684,10 @@ struct CompilerIdNode : public cmGeneratorExpressionNode
       if (cmsysString_strcasecmp(param.c_str(), compilerId.c_str()) == 0) {
         switch (context->LG->GetPolicyStatus(cmPolicies::CMP0044)) {
           case cmPolicies::WARN: {
-            std::ostringstream e;
-            e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0044);
             context->LG->GetCMakeInstance()->IssueMessage(
-              MessageType::AUTHOR_WARNING, e.str(), context->Backtrace);
+              MessageType::AUTHOR_WARNING,
+              cmPolicies::GetPolicyWarning(cmPolicies::CMP0044),
+              context->Backtrace);
             CM_FALLTHROUGH;
           }
           case cmPolicies::OLD:
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 2e9a11a..e101985 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3289,10 +3289,9 @@ std::vector<BT<std::string>> 
cmGeneratorTarget::GetCompileDefinitions(
     if (configProp) {
       switch (this->Makefile->GetPolicyStatus(cmPolicies::CMP0043)) {
         case cmPolicies::WARN: {
-          std::ostringstream e;
-          e << cmPolicies::GetPolicyWarning(cmPolicies::CMP0043);
-          this->LocalGenerator->IssueMessage(MessageType::AUTHOR_WARNING,
-                                             e.str());
+          this->LocalGenerator->IssueMessage(
+            MessageType::AUTHOR_WARNING,
+            cmPolicies::GetPolicyWarning(cmPolicies::CMP0043));
           CM_FALLTHROUGH;
         }
         case cmPolicies::OLD: {
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index bb6ad16..acf616f 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -636,9 +636,7 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& 
macrosFile,
   // follow the expected naming scheme. Expected naming scheme is that
   // the subkeys of OtherProjects7 is 0 to n-1, so it's ok to use "n"
   // as the name of the next subkey.
-  std::ostringstream ossNext;
-  ossNext << index;
-  nextAvailableSubKeyName = ossNext.str();
+  nextAvailableSubKeyName = std::to_string(index);
 
   keyname = regKeyBase + "\\RecordingProject7";
   hkey = NULL;
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 8b428a9..a0d1d42 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -368,10 +368,9 @@ bool 
cmInstallCommand::HandleTargetsMode(std::vector<std::string> const& args)
       !objectArgs.GetType().empty() || !frameworkArgs.GetType().empty() ||
       !bundleArgs.GetType().empty() || !privateHeaderArgs.GetType().empty() ||
       !publicHeaderArgs.GetType().empty() || !resourceArgs.GetType().empty()) {
-    std::ostringstream e;
-    e << "TARGETS given TYPE option. The TYPE option may only be specified in "
-         " install(FILES) and install(DIRECTORIES).";
-    this->SetError(e.str());
+    this->SetError(
+      "TARGETS given TYPE option. The TYPE option may only be specified in "
+      " install(FILES) and install(DIRECTORIES).");
     return false;
   }
 
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx
index fe77b33..0ec80c7 100644
--- a/Source/cmListCommand.cxx
+++ b/Source/cmListCommand.cxx
@@ -440,9 +440,9 @@ bool HandleFindCommand(std::vector<std::string> const& args,
   std::vector<std::string>::iterator it =
     std::find(varArgsExpanded.begin(), varArgsExpanded.end(), args[2]);
   if (it != varArgsExpanded.end()) {
-    std::ostringstream indexStream;
-    indexStream << std::distance(varArgsExpanded.begin(), it);
-    status.GetMakefile().AddDefinition(variableName, indexStream.str());
+    status.GetMakefile().AddDefinition(
+      variableName,
+      std::to_string(std::distance(varArgsExpanded.begin(), it)));
     return true;
   }
 
diff --git a/Source/cmMacroCommand.cxx b/Source/cmMacroCommand.cxx
index 92ea9aa..201cc13 100644
--- a/Source/cmMacroCommand.cxx
+++ b/Source/cmMacroCommand.cxx
@@ -2,7 +2,6 @@
    file Copyright.txt or https://cmake.org/licensing for details.  */
 #include "cmMacroCommand.h"
 
-#include <sstream>
 #include <stdio.h>
 #include <utility>
 
@@ -64,9 +63,7 @@ bool cmMacroHelperCommand::operator()(
                                       this->Policies);
 
   // set the value of argc
-  std::ostringstream argcDefStream;
-  argcDefStream << expandedArgs.size();
-  std::string argcDef = argcDefStream.str();
+  std::string argcDef = std::to_string(expandedArgs.size());
 
   std::vector<std::string>::const_iterator eit =
     expandedArgs.begin() + (this->Args.size() - 1);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 78351c1..413180c 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2813,9 +2813,7 @@ MessageType cmMakefile::ExpandVariablesInStringNew(
           switch (var.domain) {
             case NORMAL:
               if (filename && lookup == lineVar) {
-                std::ostringstream ostr;
-                ostr << line;
-                varresult = ostr.str();
+                varresult = std::to_string(line);
               } else {
                 value = this->GetDefinition(lookup);
               }
@@ -3248,9 +3246,7 @@ void cmMakefile::SetScriptModeFile(std::string const& 
scriptfile)
 
 void cmMakefile::SetArgcArgv(const std::vector<std::string>& args)
 {
-  std::ostringstream strStream;
-  strStream << args.size();
-  this->AddDefinition("CMAKE_ARGC", strStream.str());
+  this->AddDefinition("CMAKE_ARGC", std::to_string(args.size()));
   // this->MarkVariableAsUsed("CMAKE_ARGC");
 
   for (unsigned int t = 0; t < args.size(); ++t) {
@@ -4498,10 +4494,10 @@ bool cmMakefile::HaveCStandardAvailable(cmTarget const* 
target,
   const char* defaultCStandard =
     this->GetDefinition("CMAKE_C_STANDARD_DEFAULT");
   if (!defaultCStandard) {
-    std::ostringstream e;
-    e << "CMAKE_C_STANDARD_DEFAULT is not set.  COMPILE_FEATURES support "
-         "not fully configured for this compiler.";
-    this->IssueMessage(MessageType::INTERNAL_ERROR, e.str());
+    this->IssueMessage(
+      MessageType::INTERNAL_ERROR,
+      "CMAKE_C_STANDARD_DEFAULT is not set.  COMPILE_FEATURES support "
+      "not fully configured for this compiler.");
     // Return true so the caller does not try to lookup the default standard.
     return true;
   }
@@ -4582,10 +4578,10 @@ bool cmMakefile::HaveCxxStandardAvailable(cmTarget 
const* target,
   const char* defaultCxxStandard =
     this->GetDefinition("CMAKE_CXX_STANDARD_DEFAULT");
   if (!defaultCxxStandard) {
-    std::ostringstream e;
-    e << "CMAKE_CXX_STANDARD_DEFAULT is not set.  COMPILE_FEATURES support "
-         "not fully configured for this compiler.";
-    this->IssueMessage(MessageType::INTERNAL_ERROR, e.str());
+    this->IssueMessage(
+      MessageType::INTERNAL_ERROR,
+      "CMAKE_CXX_STANDARD_DEFAULT is not set.  COMPILE_FEATURES support "
+      "not fully configured for this compiler.");
     // Return true so the caller does not try to lookup the default standard.
     return true;
   }
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index bc1b9de..bd1dc86 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1084,21 +1084,19 @@ void cmTarget::SetProperty(const std::string& prop, 
const char* value)
   MAKE_STATIC_PROP(TYPE);
 #undef MAKE_STATIC_PROP
   if (prop == propMANUALLY_ADDED_DEPENDENCIES) {
-    std::ostringstream e;
-    e << "MANUALLY_ADDED_DEPENDENCIES property is read-only\n";
-    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str());
+    impl->Makefile->IssueMessage(
+      MessageType::FATAL_ERROR,
+      "MANUALLY_ADDED_DEPENDENCIES property is read-only\n");
     return;
   }
   if (prop == propNAME) {
-    std::ostringstream e;
-    e << "NAME property is read-only\n";
-    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str());
+    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR,
+                                 "NAME property is read-only\n");
     return;
   }
   if (prop == propTYPE) {
-    std::ostringstream e;
-    e << "TYPE property is read-only\n";
-    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str());
+    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR,
+                                 "TYPE property is read-only\n");
     return;
   }
   if (prop == propEXPORT_NAME && this->IsImported()) {
@@ -1225,9 +1223,8 @@ void cmTarget::AppendProperty(const std::string& prop, 
const char* value,
     return;
   }
   if (prop == "NAME") {
-    std::ostringstream e;
-    e << "NAME property is read-only\n";
-    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str());
+    impl->Makefile->IssueMessage(MessageType::FATAL_ERROR,
+                                 "NAME property is read-only\n");
     return;
   }
   if (prop == "EXPORT_NAME" && this->IsImported()) {
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index 9e32226..a9be729 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -168,9 +168,7 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
         return std::string();
       }
 
-      std::ostringstream ss;
-      ss << static_cast<long int>(difftime(timeT, unixEpoch));
-      return ss.str();
+      return std::to_string(static_cast<long int>(difftime(timeT, unixEpoch)));
     }
     default: {
       return formatString;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index a5c8d46..7124958 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -2106,9 +2106,7 @@ int cmake::CheckBuildSystem()
   // If no file is provided for the check, we have to rerun.
   if (this->CheckBuildSystemArgument.empty()) {
     if (verbose) {
-      std::ostringstream msg;
-      msg << "Re-run cmake no build system arguments\n";
-      cmSystemTools::Stdout(msg.str());
+      cmSystemTools::Stdout("Re-run cmake no build system arguments\n");
     }
     return 1;
   }
@@ -2191,10 +2189,8 @@ int cmake::CheckBuildSystem()
   if (depends.empty() || outputs.empty()) {
     // Not enough information was provided to do the test.  Just rerun.
     if (verbose) {
-      std::ostringstream msg;
-      msg << "Re-run cmake no CMAKE_MAKEFILE_DEPENDS "
-             "or CMAKE_MAKEFILE_OUTPUTS :\n";
-      cmSystemTools::Stdout(msg.str());
+      cmSystemTools::Stdout("Re-run cmake no CMAKE_MAKEFILE_DEPENDS "
+                            "or CMAKE_MAKEFILE_OUTPUTS :\n");
     }
     return 1;
   }
@@ -2210,9 +2206,8 @@ int cmake::CheckBuildSystem()
       }
     } else {
       if (verbose) {
-        std::ostringstream msg;
-        msg << "Re-run cmake: build system dependency is missing\n";
-        cmSystemTools::Stdout(msg.str());
+        cmSystemTools::Stdout(
+          "Re-run cmake: build system dependency is missing\n");
       }
       return 1;
     }
@@ -2229,9 +2224,8 @@ int cmake::CheckBuildSystem()
       }
     } else {
       if (verbose) {
-        std::ostringstream msg;
-        msg << "Re-run cmake: build system output is missing\n";
-        cmSystemTools::Stdout(msg.str());
+        cmSystemTools::Stdout(
+          "Re-run cmake: build system output is missing\n");
       }
       return 1;
     }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a7aade84198343af9de79fda5c37560a2f9531a4
commit a7aade84198343af9de79fda5c37560a2f9531a4
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Aug 21 15:03:56 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Aug 22 13:06:15 2019 -0400

    cmGlobalVisualStudioGenerator: Fix buffer sizes used with RegEnumKeyExW
    
    In commit 0b9906c2fb (Windows: Use wide-character system APIs,
    2013-12-04, v3.0.0-rc1~254^2) several buffer size computations had to be
    updated to multiply by `sizeof(wchar_t)`, but for RegEnumKeyExW we were
    already computing the correct number of characters with a division which
    was accidentally converted to a multiplication.  Use `cm::size` to
    compute the number of characters in the buffer instead.
    
    Issue: #19610

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index fea7bfd..724210e 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -556,9 +556,9 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& 
macrosFile,
   if (ERROR_SUCCESS == result) {
     // Iterate the subkeys and look for the values of interest in each subkey:
     wchar_t subkeyname[256];
-    DWORD cch_subkeyname = sizeof(subkeyname) * sizeof(subkeyname[0]);
+    DWORD cch_subkeyname = cm::size(subkeyname);
     wchar_t keyclass[256];
-    DWORD cch_keyclass = sizeof(keyclass) * sizeof(keyclass[0]);
+    DWORD cch_keyclass = cm::size(keyclass);
     FILETIME lastWriteTime;
     lastWriteTime.dwHighDateTime = 0;
     lastWriteTime.dwLowDateTime = 0;
@@ -621,8 +621,8 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& 
macrosFile,
       }
 
       ++index;
-      cch_subkeyname = sizeof(subkeyname) * sizeof(subkeyname[0]);
-      cch_keyclass = sizeof(keyclass) * sizeof(keyclass[0]);
+      cch_subkeyname = cm::size(subkeyname);
+      cch_keyclass = cm::size(keyclass);
       lastWriteTime.dwHighDateTime = 0;
       lastWriteTime.dwLowDateTime = 0;
     }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f6211f57d6b350dd8d701c19f80a0a458203e909
commit f6211f57d6b350dd8d701c19f80a0a458203e909
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Wed Aug 21 15:03:56 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Aug 22 11:01:50 2019 -0400

    cmGlobalVisualStudioGenerator: Fix buffer sizes used RegQueryValueExW
    
    In commit 0b9906c2fb (Windows: Use wide-character system APIs,
    2013-12-04, v3.0.0-rc1~254^2) several buffer size computations had to be
    updated to multiply by `sizeof(wchar_t)`, but some for RegQueryValueExW
    were incorrect because the number of bytes was already computed.
    
    Issue: #19610

diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index 18cf922..fea7bfd 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -572,8 +572,8 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& 
macrosFile,
       if (ERROR_SUCCESS == result) {
         DWORD valueType = REG_SZ;
         wchar_t data1[256];
-        DWORD cch_data1 = sizeof(data1) * sizeof(data1[0]);
-        RegQueryValueExW(hsubkey, L"Path", 0, &valueType, (LPBYTE)&data1[0],
+        DWORD cch_data1 = sizeof(data1);
+        RegQueryValueExW(hsubkey, L"Path", 0, &valueType, (LPBYTE)data1,
                          &cch_data1);
 
         DWORD data2 = 0;
@@ -649,9 +649,8 @@ bool IsVisualStudioMacrosFileRegistered(const std::string& 
macrosFile,
   if (ERROR_SUCCESS == result) {
     DWORD valueType = REG_SZ;
     wchar_t data1[256];
-    DWORD cch_data1 = sizeof(data1) * sizeof(data1[0]);
-    RegQueryValueExW(hkey, L"Path", 0, &valueType, (LPBYTE)&data1[0],
-                     &cch_data1);
+    DWORD cch_data1 = sizeof(data1);
+    RegQueryValueExW(hkey, L"Path", 0, &valueType, (LPBYTE)data1, &cch_data1);
 
     DWORD data2 = 0;
     DWORD cch_data2 = sizeof(data2);

-----------------------------------------------------------------------

Summary of changes:
 Source/CPack/cmCPackBundleGenerator.cxx        |  5 +-
 Source/CPack/cmCPackLog.cxx                    | 10 ++--
 Source/CTest/cmCTestBuildCommand.cxx           | 13 +++--
 Source/CTest/cmCTestHandlerCommand.cxx         |  5 +-
 Source/CTest/cmCTestMemCheckCommand.cxx        |  9 ++--
 Source/CTest/cmCTestMemCheckHandler.cxx        |  5 +-
 Source/CTest/cmCTestMultiProcessHandler.cxx    |  3 ++
 Source/CTest/cmCTestRunScriptCommand.cxx       |  6 +--
 Source/CTest/cmCTestRunTest.cxx                |  3 +-
 Source/CTest/cmCTestTestHandler.cxx            |  5 +-
 Source/cmAddExecutableCommand.cxx              |  4 +-
 Source/cmAddLibraryCommand.cxx                 | 68 ++++++++++----------------
 Source/cmCMakeHostSystemInformationCommand.cxx |  5 +-
 Source/cmCTest.cxx                             |  4 +-
 Source/cmCommandArgumentParserHelper.cxx       |  4 +-
 Source/cmExportFileGenerator.cxx               |  4 +-
 Source/cmFileCopier.cxx                        |  5 +-
 Source/cmFunctionCommand.cxx                   |  4 +-
 Source/cmGeneratorExpressionNode.cxx           |  6 +--
 Source/cmGeneratorTarget.cxx                   |  7 ++-
 Source/cmGlobalVisualStudioGenerator.cxx       | 21 ++++----
 Source/cmInstallCommand.cxx                    |  7 ++-
 Source/cmListCommand.cxx                       |  6 +--
 Source/cmMacroCommand.cxx                      |  5 +-
 Source/cmMakefile.cxx                          | 24 ++++-----
 Source/cmMakefileTargetGenerator.cxx           |  8 +--
 Source/cmMessageCommand.cxx                    |  4 +-
 Source/cmTarget.cxx                            | 21 ++++----
 Source/cmTimestamp.cxx                         |  4 +-
 Source/cmVSSetupHelper.h                       | 22 +--------
 Source/cmake.cxx                               | 20 +++-----
 31 files changed, 119 insertions(+), 198 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to