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  94970cd042963bedd4594d867802880b13fa9f69 (commit)
       via  ac419931eed3e62cc69762a2a8b8dd76192999c0 (commit)
       via  0476d16589cf62bc631acc2f50ff2a0525b6d641 (commit)
       via  ae309d757dfb4f654360f5412b86243e54cc387a (commit)
       via  b583e43c2617e31262e46271c1889a27b5c870cc (commit)
       via  224a5c9b07d7f999f1c925454b44f0bc0a28549e (commit)
       via  2cc6eedde479568b99320fe17b418a520a7d1c10 (commit)
       via  af000abbba8dd5ca0a1632a651d3bea00d1a1b43 (commit)
       via  0e8b0ae636b6d6c517046d9b4fac8490c30e39e0 (commit)
       via  b3b081ccec9617e4f63a18ceae2c1f2e522637aa (commit)
       via  47caf146c5d89ed4a06fb528deb548aa199233ed (commit)
       via  4d55c1f541f2fd31522192e0e8f0838f20de2a29 (commit)
       via  861dbef4e718a8500721f48b617c33088067a3a1 (commit)
       via  df8aa3c8add4de253c8eb80129b0893c16d63f2d (commit)
       via  7975edeac5885634af347e6774e7928277d6bc17 (commit)
       via  92d9ec9bfb61d2cd35a82d6906de86c71350b865 (commit)
       via  6ebe40c6ae736157c2cd036ee01b771ae399b11d (commit)
       via  4e315e9449735fc0f246c8cc838613693e849296 (commit)
       via  c925166764800be637ffc6d1df5086ebcabb766d (commit)
       via  001446126e71b3829855aac29048999b7a4ce6f4 (commit)
       via  9dd255548d0a82994da71c3667f3b6668de50ffd (commit)
       via  c36bf6b13c6798d6388a2b4ca0c802a47f1b1ed4 (commit)
      from  c068236bb9d003c43856dd2bc2052605d4377982 (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=94970cd042963bedd4594d867802880b13fa9f69
commit 94970cd042963bedd4594d867802880b13fa9f69
Merge: ac41993 9dd2555
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 13:00:00 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 25 08:02:07 2019 -0500

    Merge topic 'error-consolidate'
    
    9dd255548d cmSystemTools::Error: consolidate parameters into single 
std::string
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !2995


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ac419931eed3e62cc69762a2a8b8dd76192999c0
commit ac419931eed3e62cc69762a2a8b8dd76192999c0
Merge: 0476d16 0014461
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 13:00:07 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 25 08:00:59 2019 -0500

    Merge topic 'swift-partials'
    
    001446126e Ninja: add final placeholders to merge Swift partials
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !2998


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0476d16589cf62bc631acc2f50ff2a0525b6d641
commit 0476d16589cf62bc631acc2f50ff2a0525b6d641
Merge: ae309d7 4e315e9
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 12:59:51 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 25 07:59:59 2019 -0500

    Merge topic 'systools-stdstring3'
    
    4e315e9449 cmSystemTools: More functions accept `std::string` params
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !2999


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae309d757dfb4f654360f5412b86243e54cc387a
commit ae309d757dfb4f654360f5412b86243e54cc387a
Merge: b583e43 af000ab
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 07:58:22 2019 -0500
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Mon Feb 25 07:58:22 2019 -0500

    Merge branch 'release-3.14'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b583e43c2617e31262e46271c1889a27b5c870cc
commit b583e43c2617e31262e46271c1889a27b5c870cc
Merge: 224a5c9 47caf14
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 12:55:21 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 25 07:57:23 2019 -0500

    Merge topic 'releasenotes_arch_independent'
    
    47caf146c5 Help: Add release note for new ARCH_INDEPENDENT option
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3012


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=224a5c9b07d7f999f1c925454b44f0bc0a28549e
commit 224a5c9b07d7f999f1c925454b44f0bc0a28549e
Merge: 2cc6eed 4d55c1f
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 12:55:28 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 25 07:56:25 2019 -0500

    Merge topic 'docs_try_commands'
    
    4d55c1f541 Help: Caveat for try_compile() and 
CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
    861dbef4e7 Help: Consistency in try_compile() docs for target type
    df8aa3c8ad Help: try_compile() readability and grammar improvements
    7975edeac5 Help: User-provided variable names for try_* commands
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3013


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2cc6eedde479568b99320fe17b418a520a7d1c10
commit 2cc6eedde479568b99320fe17b418a520a7d1c10
Merge: c068236 92d9ec9
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 25 12:55:14 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 25 07:55:20 2019 -0500

    Merge topic 'check_lang_source_runs_output'
    
    92d9ec9bfb CheckLangSourceRuns: Capture run output to log files
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3011


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e315e9449735fc0f246c8cc838613693e849296
commit 4e315e9449735fc0f246c8cc838613693e849296
Author:     Vitaly Stakhovsky <vvs31...@gitlab.org>
AuthorDate: Wed Feb 20 13:50:00 2019 -0500
Commit:     Vitaly Stakhovsky <vvs31...@gitlab.org>
CommitDate: Wed Feb 20 14:53:39 2019 -0500

    cmSystemTools: More functions accept `std::string` params

diff --git a/Source/CPack/cmCPackGenerator.cxx 
b/Source/CPack/cmCPackGenerator.cxx
index 575254e..127bcf9 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -1255,9 +1255,8 @@ bool cmCPackGenerator::ConfigureFile(const std::string& 
inName,
 
 int cmCPackGenerator::CleanTemporaryDirectory()
 {
-  std::string tempInstallDirectoryWithPostfix =
+  std::string tempInstallDirectory =
     this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
-  const char* tempInstallDirectory = tempInstallDirectoryWithPostfix.c_str();
   if (cmsys::SystemTools::FileExists(tempInstallDirectory)) {
     cmCPackLogger(cmCPackLog::LOG_OUTPUT,
                   "- Clean temporary : " << tempInstallDirectory << std::endl);
diff --git a/Source/CTest/cmCTestBZR.cxx b/Source/CTest/cmCTestBZR.cxx
index b154caf..83aeb64 100644
--- a/Source/CTest/cmCTestBZR.cxx
+++ b/Source/CTest/cmCTestBZR.cxx
@@ -365,7 +365,7 @@ bool cmCTestBZR::UpdateImpl()
   if (opts.empty()) {
     opts = this->CTest->GetCTestConfiguration("BZRUpdateOptions");
   }
-  std::vector<std::string> args = cmSystemTools::ParseArguments(opts.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
 
   // TODO: if(this->CTest->GetTestModel() == cmCTest::NIGHTLY)
 
diff --git a/Source/CTest/cmCTestBuildHandler.cxx 
b/Source/CTest/cmCTestBuildHandler.cxx
index c75f4d4..07bc7e7 100644
--- a/Source/CTest/cmCTestBuildHandler.cxx
+++ b/Source/CTest/cmCTestBuildHandler.cxx
@@ -418,8 +418,8 @@ int cmCTestBuildHandler::ProcessHandler()
   int retVal = 0;
   int res = cmsysProcess_State_Exited;
   if (!this->CTest->GetShowOnly()) {
-    res = this->RunMakeCommand(makeCommand.c_str(), &retVal,
-                               buildDirectory.c_str(), 0, ofs);
+    res = this->RunMakeCommand(makeCommand, &retVal, buildDirectory.c_str(), 0,
+                               ofs);
   } else {
     cmCTestOptionalLog(this->CTest, DEBUG,
                        "Build with command: " << makeCommand << std::endl,
@@ -766,9 +766,10 @@ void 
cmCTestBuildHandler::LaunchHelper::WriteScrapeMatchers(
   }
 }
 
-int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
-                                        const char* dir, int timeout,
-                                        std::ostream& ofs, Encoding encoding)
+int cmCTestBuildHandler::RunMakeCommand(const std::string& command,
+                                        int* retVal, const char* dir,
+                                        int timeout, std::ostream& ofs,
+                                        Encoding encoding)
 {
   // First generate the command and arguments
   std::vector<std::string> args = cmSystemTools::ParseArguments(command);
diff --git a/Source/CTest/cmCTestBuildHandler.h 
b/Source/CTest/cmCTestBuildHandler.h
index a9b121b..722c590 100644
--- a/Source/CTest/cmCTestBuildHandler.h
+++ b/Source/CTest/cmCTestBuildHandler.h
@@ -52,7 +52,7 @@ private:
 
   //! Run command specialized for make and configure. Returns process status
   // and retVal is return value or exception.
-  int RunMakeCommand(const char* command, int* retVal, const char* dir,
+  int RunMakeCommand(const std::string& command, int* retVal, const char* dir,
                      int timeout, std::ostream& ofs,
                      Encoding encoding = cmProcessOutput::Auto);
 
diff --git a/Source/CTest/cmCTestCVS.cxx b/Source/CTest/cmCTestCVS.cxx
index 6e8f73f..9c03839 100644
--- a/Source/CTest/cmCTestCVS.cxx
+++ b/Source/CTest/cmCTestCVS.cxx
@@ -78,7 +78,7 @@ bool cmCTestCVS::UpdateImpl()
       opts = "-dP";
     }
   }
-  std::vector<std::string> args = cmSystemTools::ParseArguments(opts.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
 
   // Specify the start time for nightly testing.
   if (this->CTest->GetTestModel() == cmCTest::NIGHTLY) {
diff --git a/Source/CTest/cmCTestConfigureHandler.cxx 
b/Source/CTest/cmCTestConfigureHandler.cxx
index 6b7601b..7e93189 100644
--- a/Source/CTest/cmCTestConfigureHandler.cxx
+++ b/Source/CTest/cmCTestConfigureHandler.cxx
@@ -61,7 +61,7 @@ int cmCTestConfigureHandler::ProcessHandler()
     cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
                        "Configure with command: " << cCommand << std::endl,
                        this->Quiet);
-    res = this->CTest->RunMakeCommand(cCommand.c_str(), output, &retVal,
+    res = this->CTest->RunMakeCommand(cCommand, output, &retVal,
                                       buildDirectory.c_str(),
                                       cmDuration::zero(), ofs);
 
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx 
b/Source/CTest/cmCTestCoverageHandler.cxx
index 4dda9ad..d76bd2a 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -1004,7 +1004,7 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
   static_cast<void>(locale_C);
 
   std::vector<std::string> basecovargs =
-    cmSystemTools::ParseArguments(gcovExtraFlags.c_str());
+    cmSystemTools::ParseArguments(gcovExtraFlags);
   basecovargs.insert(basecovargs.begin(), gcovCommand);
   basecovargs.emplace_back("-o");
 
@@ -1377,7 +1377,7 @@ int cmCTestCoverageHandler::HandleLCovCoverage(
   static_cast<void>(locale_C);
 
   std::vector<std::string> covargs =
-    cmSystemTools::ParseArguments(lcovExtraFlags.c_str());
+    cmSystemTools::ParseArguments(lcovExtraFlags);
   covargs.insert(covargs.begin(), lcovCommand);
   const std::string command = joinCommandLine(covargs);
 
diff --git a/Source/CTest/cmCTestGIT.cxx b/Source/CTest/cmCTestGIT.cxx
index 210abe5..11cd005 100644
--- a/Source/CTest/cmCTestGIT.cxx
+++ b/Source/CTest/cmCTestGIT.cxx
@@ -162,7 +162,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
   if (opts.empty()) {
     opts = this->CTest->GetCTestConfiguration("GITUpdateOptions");
   }
-  std::vector<std::string> args = cmSystemTools::ParseArguments(opts.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
   for (std::string const& arg : args) {
     git_fetch.push_back(arg.c_str());
   }
diff --git a/Source/CTest/cmCTestHG.cxx b/Source/CTest/cmCTestHG.cxx
index 6fb99d8..727c59c 100644
--- a/Source/CTest/cmCTestHG.cxx
+++ b/Source/CTest/cmCTestHG.cxx
@@ -144,7 +144,7 @@ bool cmCTestHG::UpdateImpl()
   if (opts.empty()) {
     opts = this->CTest->GetCTestConfiguration("HGUpdateOptions");
   }
-  std::vector<std::string> args = cmSystemTools::ParseArguments(opts.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
   for (std::string const& arg : args) {
     hg_update.push_back(arg.c_str());
   }
diff --git a/Source/CTest/cmCTestMemCheckHandler.cxx 
b/Source/CTest/cmCTestMemCheckHandler.cxx
index 954f5bb..22c8469 100644
--- a/Source/CTest/cmCTestMemCheckHandler.cxx
+++ b/Source/CTest/cmCTestMemCheckHandler.cxx
@@ -520,7 +520,7 @@ bool cmCTestMemCheckHandler::InitializeMemoryChecking()
       this->CTest->GetCTestConfiguration("ValgrindCommandOptions");
   }
   this->MemoryTesterOptions =
-    cmSystemTools::ParseArguments(memoryTesterOptions.c_str());
+    cmSystemTools::ParseArguments(memoryTesterOptions);
 
   this->MemoryTesterOutputFile =
     this->CTest->GetBinaryDir() + "/Testing/Temporary/MemoryChecker.??.log";
diff --git a/Source/CTest/cmCTestP4.cxx b/Source/CTest/cmCTestP4.cxx
index ac4753c..315f498 100644
--- a/Source/CTest/cmCTestP4.cxx
+++ b/Source/CTest/cmCTestP4.cxx
@@ -324,8 +324,7 @@ void cmCTestP4::SetP4Options(std::vector<char const*>& 
CommandOptions)
     // The CTEST_P4_OPTIONS variable adds additional Perforce command line
     // options before the main command
     std::string opts = this->CTest->GetCTestConfiguration("P4Options");
-    std::vector<std::string> args =
-      cmSystemTools::ParseArguments(opts.c_str());
+    std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
 
     P4Options.insert(P4Options.end(), args.begin(), args.end());
   }
@@ -501,7 +500,7 @@ bool cmCTestP4::UpdateImpl()
   if (opts.empty()) {
     opts = this->CTest->GetCTestConfiguration("P4UpdateOptions");
   }
-  std::vector<std::string> args = cmSystemTools::ParseArguments(opts.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
   for (std::string const& arg : args) {
     p4_sync.push_back(arg.c_str());
   }
diff --git a/Source/CTest/cmCTestSVN.cxx b/Source/CTest/cmCTestSVN.cxx
index 3bf66ca..b7a4e4c 100644
--- a/Source/CTest/cmCTestSVN.cxx
+++ b/Source/CTest/cmCTestSVN.cxx
@@ -242,7 +242,7 @@ bool cmCTestSVN::UpdateImpl()
   if (opts.empty()) {
     opts = this->CTest->GetCTestConfiguration("SVNUpdateOptions");
   }
-  std::vector<std::string> args = cmSystemTools::ParseArguments(opts.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(opts);
 
   // Specify the start time for nightly testing.
   if (this->CTest->GetTestModel() == cmCTest::NIGHTLY) {
@@ -277,7 +277,7 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> 
const& parameters,
   std::string userOptions = this->CTest->GetCTestConfiguration("SVNOptions");
 
   std::vector<std::string> parsedUserOptions =
-    cmSystemTools::ParseArguments(userOptions.c_str());
+    cmSystemTools::ParseArguments(userOptions);
   for (std::string const& opt : parsedUserOptions) {
     args.push_back(opt.c_str());
   }
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index ba2fe6c..c77bb97 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1009,7 +1009,7 @@ int cmCTest::GetTestModelFromString(const char* str)
 //######################################################################
 //######################################################################
 
-int cmCTest::RunMakeCommand(const char* command, std::string& output,
+int cmCTest::RunMakeCommand(const std::string& command, std::string& output,
                             int* retVal, const char* dir, cmDuration timeout,
                             std::ostream& ofs, Encoding encoding)
 {
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 7dbf4d5..a765fed 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -280,8 +280,9 @@ public:
    * Run command specialized for make and configure. Returns process status
    * and retVal is return value or exception.
    */
-  int RunMakeCommand(const char* command, std::string& output, int* retVal,
-                     const char* dir, cmDuration timeout, std::ostream& ofs,
+  int RunMakeCommand(const std::string& command, std::string& output,
+                     int* retVal, const char* dir, cmDuration timeout,
+                     std::ostream& ofs,
                      Encoding encoding = cmProcessOutput::Auto);
 
   /** Return the current tag */
diff --git a/Source/cmComputeLinkInformation.cxx 
b/Source/cmComputeLinkInformation.cxx
index 3d61665..eef93f8 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1266,7 +1266,7 @@ void 
cmComputeLinkInformation::AddFrameworkItem(std::string const& item)
 void cmComputeLinkInformation::AddDirectoryItem(std::string const& item)
 {
   if (this->Makefile->IsOn("APPLE") &&
-      cmSystemTools::IsPathToFramework(item.c_str())) {
+      cmSystemTools::IsPathToFramework(item)) {
     this->AddFrameworkItem(item);
   } else {
     this->DropDirectoryItem(item);
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 75a7786..f4a9a9e 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -67,7 +67,7 @@ bool 
cmExecProgramCommand::InitialPass(std::vector<std::string> const& args,
 
   std::string command;
   if (!arguments.empty()) {
-    command = cmSystemTools::ConvertToRunCommandPath(args[0].c_str());
+    command = cmSystemTools::ConvertToRunCommandPath(args[0]);
     command += " ";
     command += arguments;
   } else {
diff --git a/Source/cmGhsMultiTargetGenerator.cxx 
b/Source/cmGhsMultiTargetGenerator.cxx
index c63e01a..9f8f12b 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -210,7 +210,7 @@ void 
cmGhsMultiTargetGenerator::WriteCompilerFlags(std::ostream& fout,
   if (flagsByLangI != this->FlagsByLanguage.end()) {
     if (!flagsByLangI->second.empty()) {
       std::vector<std::string> ghsCompFlags =
-        cmSystemTools::ParseArguments(flagsByLangI->second.c_str());
+        cmSystemTools::ParseArguments(flagsByLangI->second);
       for (auto& f : ghsCompFlags) {
         fout << "    " << f << std::endl;
       }
@@ -265,16 +265,14 @@ void 
cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout,
     frameworkPath, linkPath, this->GeneratorTarget);
 
   // write out link options
-  std::vector<std::string> lopts =
-    cmSystemTools::ParseArguments(linkFlags.c_str());
+  std::vector<std::string> lopts = cmSystemTools::ParseArguments(linkFlags);
   for (auto& l : lopts) {
     fout << "    " << l << std::endl;
   }
 
   // write out link search paths
   // must be quoted for paths that contain spaces
-  std::vector<std::string> lpath =
-    cmSystemTools::ParseArguments(linkPath.c_str());
+  std::vector<std::string> lpath = cmSystemTools::ParseArguments(linkPath);
   for (auto& l : lpath) {
     fout << "    -L\"" << l << "\"" << std::endl;
   }
@@ -284,7 +282,7 @@ void 
cmGhsMultiTargetGenerator::WriteTargetLinkLine(std::ostream& fout,
   std::string cbd = this->LocalGenerator->GetCurrentBinaryDirectory();
 
   std::vector<std::string> llibs =
-    cmSystemTools::ParseArguments(linkLibraries.c_str());
+    cmSystemTools::ParseArguments(linkLibraries);
   for (auto& l : llibs) {
     if (l.compare(0, 2, "-l") == 0) {
       fout << "    \"" << l << "\"" << std::endl;
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fa0ffcc..3a56589 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2200,7 +2200,7 @@ cmGeneratorTarget* cmGlobalGenerator::FindGeneratorTarget(
 bool cmGlobalGenerator::NameResolvesToFramework(
   const std::string& libname) const
 {
-  if (cmSystemTools::IsPathToFramework(libname.c_str())) {
+  if (cmSystemTools::IsPathToFramework(libname)) {
     return true;
   }
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 8393165..1921e30 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -776,7 +776,7 @@ std::string cmLocalGenerator::GetIncludeFlags(
 #endif
   for (std::string const& i : includes) {
     if (fwSearchFlag && *fwSearchFlag && this->Makefile->IsOn("APPLE") &&
-        cmSystemTools::IsPathToFramework(i.c_str())) {
+        cmSystemTools::IsPathToFramework(i)) {
       std::string frameworkDir = i;
       frameworkDir += "/../";
       frameworkDir = cmSystemTools::CollapseFullPath(frameworkDir);
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f0e8077..28a6564 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -571,13 +571,14 @@ std::vector<std::string> 
cmSystemTools::HandleResponseFile(
   return arg_full;
 }
 
-std::vector<std::string> cmSystemTools::ParseArguments(const char* command)
+std::vector<std::string> cmSystemTools::ParseArguments(const std::string& cmd)
 {
   std::vector<std::string> args;
   std::string arg;
 
   bool win_path = false;
 
+  const char* command = cmd.c_str();
   if (command[0] && command[1] &&
       ((command[0] != '/' && command[1] == ':' && command[2] == '\\') ||
        (command[0] == '\"' && command[1] != '/' && command[2] == ':' &&
@@ -878,8 +879,7 @@ bool cmSystemTools::RunSingleCommand(const std::string& 
command,
     outputflag = OUTPUT_NONE;
   }
 
-  std::vector<std::string> args =
-    cmSystemTools::ParseArguments(command.c_str());
+  std::vector<std::string> args = cmSystemTools::ParseArguments(command);
 
   if (args.empty()) {
     return false;
@@ -1411,7 +1411,7 @@ void cmSystemTools::ConvertToOutputSlashes(std::string& 
path)
 #endif
 }
 
-std::string cmSystemTools::ConvertToRunCommandPath(const char* path)
+std::string cmSystemTools::ConvertToRunCommandPath(const std::string& path)
 {
 #if defined(_WIN32) && !defined(__CYGWIN__)
   return cmSystemTools::ConvertToWindowsOutputPath(path);
@@ -1614,7 +1614,7 @@ void cmSystemTools::EnableVSConsoleOutput()
 #endif
 }
 
-bool cmSystemTools::IsPathToFramework(const char* path)
+bool cmSystemTools::IsPathToFramework(const std::string& path)
 {
   return (cmSystemTools::FileIsFullPath(path) &&
           cmHasLiteralSuffix(path, ".framework"));
@@ -3005,7 +3005,7 @@ bool cmSystemTools::CheckRPath(std::string const& file,
 #endif
 }
 
-bool cmSystemTools::RepeatedRemoveDirectory(const char* dir)
+bool cmSystemTools::RepeatedRemoveDirectory(const std::string& dir)
 {
   // Windows sometimes locks files temporarily so try a few times.
   for (int i = 0; i < 10; ++i) {
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 82e4f01..60e8c18 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -141,7 +141,7 @@ public:
   ///! Return true if value is NOTFOUND or ends in -NOTFOUND.
   static bool IsNOTFOUND(const char* value);
   ///! Return true if the path is a framework
-  static bool IsPathToFramework(const char* value);
+  static bool IsPathToFramework(const std::string& value);
 
   static bool DoesFileExistWithExtensions(
     const std::string& name, const std::vector<std::string>& sourceExts);
@@ -242,7 +242,7 @@ public:
   /**
    * Parse arguments out of a single string command
    */
-  static std::vector<std::string> ParseArguments(const char* command);
+  static std::vector<std::string> ParseArguments(const std::string& command);
 
   /** Parse arguments out of a windows command line string.  */
   static void ParseWindowsCommandLine(const char* command,
@@ -353,7 +353,7 @@ public:
   // ConvertToRunCommandPath does not use s_ForceUnixPaths and should
   // be used when RunCommand is called from cmake, because the
   // running cmake needs paths to be in its format
-  static std::string ConvertToRunCommandPath(const char* path);
+  static std::string ConvertToRunCommandPath(const std::string& path);
 
   /** compute the relative path from local to remote.  local must
       be a directory.  remote can be a file or a directory.
@@ -488,7 +488,7 @@ public:
   static bool CheckRPath(std::string const& file, std::string const& newRPath);
 
   /** Remove a directory; repeat a few times in case of locked files.  */
-  static bool RepeatedRemoveDirectory(const char* dir);
+  static bool RepeatedRemoveDirectory(const std::string& dir);
 
   /** Tokenize a string */
   static std::vector<std::string> tokenize(const std::string& str,
diff --git a/Source/cmTryRunCommand.cxx b/Source/cmTryRunCommand.cxx
index d863339..da34bca 100644
--- a/Source/cmTryRunCommand.cxx
+++ b/Source/cmTryRunCommand.cxx
@@ -173,7 +173,7 @@ void cmTryRunCommand::RunExecutable(const std::string& 
runArgs,
     std::vector<std::string> emulatorWithArgs;
     cmSystemTools::ExpandListArgument(emulator, emulatorWithArgs);
     finalCommand +=
-      cmSystemTools::ConvertToRunCommandPath(emulatorWithArgs[0].c_str());
+      cmSystemTools::ConvertToRunCommandPath(emulatorWithArgs[0]);
     finalCommand += " ";
     for (std::string const& arg : cmMakeRange(emulatorWithArgs).advance(1)) {
       finalCommand += "\"";
@@ -182,8 +182,7 @@ void cmTryRunCommand::RunExecutable(const std::string& 
runArgs,
       finalCommand += " ";
     }
   }
-  finalCommand +=
-    cmSystemTools::ConvertToRunCommandPath(this->OutputFile.c_str());
+  finalCommand += cmSystemTools::ConvertToRunCommandPath(this->OutputFile);
   if (!runArgs.empty()) {
     finalCommand += runArgs;
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=001446126e71b3829855aac29048999b7a4ce6f4
commit 001446126e71b3829855aac29048999b7a4ce6f4
Author:     Saleem Abdulrasool <compn...@compnerd.org>
AuthorDate: Mon Feb 18 14:17:20 2019 -0800
Commit:     Saleem Abdulrasool <compn...@compnerd.org>
CommitDate: Wed Feb 20 09:25:34 2019 -0800

    Ninja: add final placeholders to merge Swift partials
    
    This adds the placeholders that are needed to merge the swift partial
    modules.  It permits generating the rules necessary to actually merge
    the partial modules emitted for a partial compilation.

diff --git a/Source/cmNinjaNormalTargetGenerator.cxx 
b/Source/cmNinjaNormalTargetGenerator.cxx
index 3784313..9def1f4 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -283,6 +283,11 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool 
useResponseFile)
       cmState::GetTargetTypeName(this->GetGeneratorTarget()->GetType());
 
     vars.Language = this->TargetLinkLanguage.c_str();
+    if (this->TargetLinkLanguage == "Swift") {
+      vars.SwiftPartialModules = "$SWIFT_PARTIAL_MODULES";
+      vars.TargetSwiftModule = "$TARGET_SWIFT_MODULE";
+      vars.TargetSwiftDoc = "$TARGET_SWIFT_DOC";
+    }
 
     std::string responseFlag;
     if (!useResponseFile) {
@@ -787,6 +792,34 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement()
   cmNinjaDeps outputs;
   outputs.push_back(targetOutputReal);
 
+  if (this->TargetLinkLanguage == "Swift") {
+    if (const char* name = gt.GetProperty("SWIFT_MODULE_NAME")) {
+      vars["TARGET_SWIFT_DOC"] = std::string(name) + ".swiftdoc";
+      vars["TARGET_SWIFT_MODULE"] = std::string(name) + ".swiftmodule";
+    } else {
+      vars["TARGET_SWIFT_DOC"] = gt.GetName() + ".swiftdoc";
+      vars["TARGET_SWIFT_MODULE"] = gt.GetName() + ".swiftmodule";
+    }
+    outputs.push_back(vars["TARGET_SWIFT_DOC"]);
+    outputs.push_back(vars["TARGET_SWIFT_MODULE"]);
+
+    cmLocalNinjaGenerator& localGen = *this->GetLocalGenerator();
+
+    std::string partials;
+    std::vector<cmSourceFile const*> sources;
+    gt.GetObjectSources(sources, this->GetConfigName());
+    for (cmSourceFile const* source : sources) {
+      partials += " ";
+      if (const char* partial = source->GetProperty("SWIFT_PARTIAL_MODULE")) {
+        partials += partial;
+      } else {
+        partials += localGen.GetTargetDirectory(&gt) + "/" +
+          gt.GetObjectName(source) + ".swiftmodule";
+      }
+    }
+    vars["SWIFT_PARTIAL_MODULES"] = partials;
+  }
+
   // Compute specific libraries to link with.
   cmNinjaDeps explicitDeps = this->GetObjects();
   cmNinjaDeps implicitDeps = this->ComputeLinkDeps(this->TargetLinkLanguage);
diff --git a/Source/cmRulePlaceholderExpander.cxx 
b/Source/cmRulePlaceholderExpander.cxx
index 18d00b1..309ee30 100644
--- a/Source/cmRulePlaceholderExpander.cxx
+++ b/Source/cmRulePlaceholderExpander.cxx
@@ -187,6 +187,21 @@ std::string cmRulePlaceholderExpander::ExpandRuleVariable(
       return replaceValues.SwiftPartialModule;
     }
   }
+  if (replaceValues.SwiftPartialModules) {
+    if (variable == "SWIFT_PARTIAL_MODULES") {
+      return replaceValues.SwiftPartialModules;
+    }
+  }
+  if (replaceValues.TargetSwiftDoc) {
+    if (variable == "TARGET_SWIFT_DOC") {
+      return replaceValues.TargetSwiftDoc;
+    }
+  }
+  if (replaceValues.TargetSwiftModule) {
+    if (variable == "TARGET_SWIFT_MODULE") {
+      return replaceValues.TargetSwiftModule;
+    }
+  }
   if (variable == "TARGET_SONAME" || variable == "SONAME_FLAG" ||
       variable == "TARGET_INSTALLNAME_DIR") {
     // All these variables depend on TargetSOName
diff --git a/Source/cmRulePlaceholderExpander.h 
b/Source/cmRulePlaceholderExpander.h
index 93d0577..ebd4d41 100644
--- a/Source/cmRulePlaceholderExpander.h
+++ b/Source/cmRulePlaceholderExpander.h
@@ -63,6 +63,9 @@ public:
     const char* SwiftLibraryName;
     const char* SwiftPartialModule;
     const char* SwiftPartialDoc;
+    const char* TargetSwiftModule;
+    const char* TargetSwiftDoc;
+    const char* SwiftPartialModules;
   };
 
   // Expand rule variables in CMake of the type found in language rules

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dd255548d0a82994da71c3667f3b6668de50ffd
commit 9dd255548d0a82994da71c3667f3b6668de50ffd
Author:     Vitaly Stakhovsky <vvs31...@gitlab.org>
AuthorDate: Wed Feb 20 11:15:00 2019 -0500
Commit:     Vitaly Stakhovsky <vvs31...@gitlab.org>
CommitDate: Wed Feb 20 11:18:11 2019 -0500

    cmSystemTools::Error: consolidate parameters into single std::string

diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx 
b/Source/CTest/cmCTestMultiProcessHandler.cxx
index 63c2fcc..1c16a71 100644
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
@@ -109,8 +109,8 @@ void cmCTestMultiProcessHandler::SetTestLoad(unsigned long 
load)
                             fake_load_value)) {
     if (!cmSystemTools::StringToULong(fake_load_value.c_str(),
                                       &this->FakeLoadForTesting)) {
-      cmSystemTools::Error("Failed to parse fake load value: ",
-                           fake_load_value.c_str());
+      cmSystemTools::Error("Failed to parse fake load value: " +
+                           fake_load_value);
     }
   }
 }
diff --git a/Source/CTest/cmCTestScriptHandler.cxx 
b/Source/CTest/cmCTestScriptHandler.cxx
index a714abe..43cfe16 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -331,7 +331,7 @@ int cmCTestScriptHandler::ReadInScript(const std::string& 
total_script_arg)
   }
   // make sure the file exists
   if (!cmSystemTools::FileExists(script)) {
-    cmSystemTools::Error("Cannot find file: ", script.c_str());
+    cmSystemTools::Error("Cannot find file: " + script);
     return 1;
   }
 
@@ -471,8 +471,8 @@ int cmCTestScriptHandler::ExtractVariables()
     msg += "\nCTEST_COMMAND = ";
     msg += (!this->CTestCmd.empty()) ? this->CTestCmd.c_str() : "(Null)";
     cmSystemTools::Error(
-      "Some required settings in the configuration file were missing:\n",
-      msg.c_str());
+      "Some required settings in the configuration file were missing:\n" +
+      msg);
     return 4;
   }
 
@@ -611,8 +611,7 @@ int cmCTestScriptHandler::CheckOutSourceDir()
       this->CVSCheckOut, &output, &output, &retVal, this->CTestRoot.c_str(),
       this->HandlerVerbose, cmDuration::zero() /*this->TimeOut*/);
     if (!res || retVal != 0) {
-      cmSystemTools::Error("Unable to perform cvs checkout:\n",
-                           output.c_str());
+      cmSystemTools::Error("Unable to perform cvs checkout:\n" + output);
       return 6;
     }
   }
@@ -678,8 +677,8 @@ int cmCTestScriptHandler::PerformExtraUpdates()
         fullCommand, &output, &output, &retVal, cvsArgs[0].c_str(),
         this->HandlerVerbose, cmDuration::zero() /*this->TimeOut*/);
       if (!res || retVal != 0) {
-        cmSystemTools::Error("Unable to perform extra updates:\n", eu.c_str(),
-                             "\nWith output:\n", output.c_str());
+        cmSystemTools::Error("Unable to perform extra updates:\n" + eu +
+                             "\nWith output:\n" + output);
         return 0;
       }
     }
@@ -721,8 +720,8 @@ int cmCTestScriptHandler::RunConfigurationDashboard()
   if (!cmSystemTools::FileExists(this->BinaryDir) &&
       this->SourceDir != this->BinaryDir) {
     if (!cmSystemTools::MakeDirectory(this->BinaryDir)) {
-      cmSystemTools::Error("Unable to create the binary directory:\n",
-                           this->BinaryDir.c_str());
+      cmSystemTools::Error("Unable to create the binary directory:\n" +
+                           this->BinaryDir);
       this->RestoreBackupDirectories();
       return 7;
     }
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 2728f0f..6116de0 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -239,8 +239,7 @@ bool cmCacheManager::SaveCache(const std::string& path, 
cmMessenger* messenger)
   cmGeneratedFileStream fout(cacheFile);
   fout.SetCopyIfDifferent(true);
   if (!fout) {
-    cmSystemTools::Error("Unable to open cache file for save. ",
-                         cacheFile.c_str());
+    cmSystemTools::Error("Unable to open cache file for save. " + cacheFile);
     cmSystemTools::ReportLastSystemError("");
     return false;
   }
@@ -364,8 +363,8 @@ bool cmCacheManager::SaveCache(const std::string& path, 
cmMessenger* messenger)
   checkCacheFile += "/cmake.check_cache";
   cmsys::ofstream checkCache(checkCacheFile.c_str());
   if (!checkCache) {
-    cmSystemTools::Error("Unable to open check cache file for write. ",
-                         checkCacheFile.c_str());
+    cmSystemTools::Error("Unable to open check cache file for write. " +
+                         checkCacheFile);
     return false;
   }
   checkCache << "# This file is generated by cmake for dependency checking "
diff --git a/Source/cmComputeLinkInformation.cxx 
b/Source/cmComputeLinkInformation.cxx
index 3d61665..abddc82 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -457,8 +457,8 @@ bool cmComputeLinkInformation::Compute()
   // We require a link language for the target.
   if (this->LinkLanguage.empty()) {
     cmSystemTools::Error(
-      "CMake can not determine linker language for target: ",
-      this->Target->GetName().c_str());
+      "CMake can not determine linker language for target: " +
+      this->Target->GetName());
     return false;
   }
 
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx
index eb52895..69d4374 100644
--- a/Source/cmCoreTryCompile.cxx
+++ b/Source/cmCoreTryCompile.cxx
@@ -950,8 +950,8 @@ void cmCoreTryCompile::CleanupFiles(std::string const& 
binDir)
   if (binDir.find("CMakeTmp") == std::string::npos) {
     cmSystemTools::Error(
       "TRY_COMPILE attempt to remove -rf directory that does not contain "
-      "CMakeTmp:",
-      binDir.c_str());
+      "CMakeTmp:" +
+      binDir);
     return;
   }
 
diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx
index b1630f9..f5c106c 100644
--- a/Source/cmDependsC.cxx
+++ b/Source/cmDependsC.cxx
@@ -173,8 +173,7 @@ bool cmDependsC::WriteDependencies(const 
std::set<std::string>& sources,
       // regex.
       if (fullName.empty() &&
           this->IncludeRegexComplain.find(current.FileName)) {
-        cmSystemTools::Error("Cannot find file \"", current.FileName.c_str(),
-                             "\".");
+        cmSystemTools::Error("Cannot find file \"" + current.FileName + "\".");
         return false;
       }
 
diff --git a/Source/cmExecProgramCommand.cxx b/Source/cmExecProgramCommand.cxx
index 75a7786..8cb666a 100644
--- a/Source/cmExecProgramCommand.cxx
+++ b/Source/cmExecProgramCommand.cxx
@@ -152,7 +152,7 @@ bool cmExecProgramCommand::RunCommand(const char* command, 
std::string& output,
         if (!cmSystemTools::FileExists(cmd)) {
           shortCmd = cmd;
         } else if (!cmSystemTools::GetShortPath(cmd.c_str(), shortCmd)) {
-          cmSystemTools::Error("GetShortPath failed for ", cmd.c_str());
+          cmSystemTools::Error("GetShortPath failed for " + cmd);
           return false;
         }
         shortCmd += " ";
diff --git a/Source/cmExportLibraryDependenciesCommand.cxx 
b/Source/cmExportLibraryDependenciesCommand.cxx
index e542e50..0a0646c 100644
--- a/Source/cmExportLibraryDependenciesCommand.cxx
+++ b/Source/cmExportLibraryDependenciesCommand.cxx
@@ -62,7 +62,7 @@ void cmExportLibraryDependenciesCommand::ConstFinalPass() 
const
   std::ostream& fout = *foutPtr;
 
   if (!fout) {
-    cmSystemTools::Error("Error Writing ", this->Filename.c_str());
+    cmSystemTools::Error("Error Writing " + this->Filename);
     cmSystemTools::ReportLastSystemError("");
     return;
   }
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx
index 4fe1587..2f47788 100644
--- a/Source/cmGeneratedFileStream.cxx
+++ b/Source/cmGeneratedFileStream.cxx
@@ -29,8 +29,7 @@ cmGeneratedFileStream::cmGeneratedFileStream(std::string 
const& name,
 {
   // Check if the file opened.
   if (!*this && !quiet) {
-    cmSystemTools::Error("Cannot open file for write: ",
-                         this->TempName.c_str());
+    cmSystemTools::Error("Cannot open file for write: " + this->TempName);
     cmSystemTools::ReportLastSystemError("");
   }
 #ifdef CMAKE_BUILD_WITH_CMAKE
@@ -68,8 +67,7 @@ cmGeneratedFileStream& 
cmGeneratedFileStream::Open(std::string const& name,
 
   // Check if the file opened.
   if (!*this && !quiet) {
-    cmSystemTools::Error("Cannot open file for write: ",
-                         this->TempName.c_str());
+    cmSystemTools::Error("Cannot open file for write: " + this->TempName);
     cmSystemTools::ReportLastSystemError("");
   }
   return *this;
diff --git a/Source/cmGlobVerificationManager.cxx 
b/Source/cmGlobVerificationManager.cxx
index 5fd890e..9fb4170 100644
--- a/Source/cmGlobVerificationManager.cxx
+++ b/Source/cmGlobVerificationManager.cxx
@@ -25,8 +25,8 @@ bool cmGlobVerificationManager::SaveVerificationScript(const 
std::string& path)
   cmGeneratedFileStream verifyScriptFile(scriptFile);
   verifyScriptFile.SetCopyIfDifferent(true);
   if (!verifyScriptFile) {
-    cmSystemTools::Error("Unable to open verification script file for save. ",
-                         scriptFile.c_str());
+    cmSystemTools::Error("Unable to open verification script file for save. " +
+                         scriptFile);
     cmSystemTools::ReportLastSystemError("");
     return false;
   }
@@ -71,8 +71,8 @@ bool cmGlobVerificationManager::SaveVerificationScript(const 
std::string& path)
 
   cmsys::ofstream verifyStampFile(stampFile.c_str());
   if (!verifyStampFile) {
-    cmSystemTools::Error("Unable to open verification stamp file for write. ",
-                         stampFile.c_str());
+    cmSystemTools::Error("Unable to open verification stamp file for write. " +
+                         stampFile);
     return false;
   }
   verifyStampFile << "# This file is generated by CMake for checking of the "
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fa0ffcc..daec0eb 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -212,7 +212,7 @@ void cmGlobalGenerator::ResolveLanguageCompiler(const 
std::string& lang,
 
   if (!mf->GetDefinition(langComp)) {
     if (!optional) {
-      cmSystemTools::Error(langComp.c_str(), " not set, after EnableLanguage");
+      cmSystemTools::Error(langComp + " not set, after EnableLanguage");
     }
     return;
   }
@@ -638,8 +638,7 @@ void cmGlobalGenerator::EnableLanguage(
       // to avoid duplicate compiler tests.
       if (cmSystemTools::FileExists(fpath)) {
         if (!mf->ReadListFile(fpath)) {
-          cmSystemTools::Error("Could not find cmake module file: ",
-                               fpath.c_str());
+          cmSystemTools::Error("Could not find cmake module file: " + fpath);
         }
         // if this file was found then the language was already determined
         // to be working
@@ -664,8 +663,8 @@ void cmGlobalGenerator::EnableLanguage(
       determineCompiler += "Compiler.cmake";
       std::string determineFile = mf->GetModulesFile(determineCompiler);
       if (!mf->ReadListFile(determineFile)) {
-        cmSystemTools::Error("Could not find cmake module file: ",
-                             determineCompiler.c_str());
+        cmSystemTools::Error("Could not find cmake module file: " +
+                             determineCompiler);
       }
       if (cmSystemTools::GetFatalErrorOccured()) {
         return;
@@ -699,8 +698,7 @@ void cmGlobalGenerator::EnableLanguage(
       fpath += lang;
       fpath += "Compiler.cmake";
       if (!mf->ReadListFile(fpath)) {
-        cmSystemTools::Error("Could not find cmake module file: ",
-                             fpath.c_str());
+        cmSystemTools::Error("Could not find cmake module file: " + fpath);
       }
       this->SetLanguageEnabledFlag(lang, mf);
       needSetLanguageEnabledMaps[lang] = true;
@@ -792,11 +790,10 @@ void cmGlobalGenerator::EnableLanguage(
       fpath += "Information.cmake";
       std::string informationFile = mf->GetModulesFile(fpath);
       if (informationFile.empty()) {
-        cmSystemTools::Error("Could not find cmake module file: ",
-                             fpath.c_str());
+        cmSystemTools::Error("Could not find cmake module file: " + fpath);
       } else if (!mf->ReadListFile(informationFile)) {
-        cmSystemTools::Error("Could not process cmake module file: ",
-                             informationFile.c_str());
+        cmSystemTools::Error("Could not process cmake module file: " +
+                             informationFile);
       }
     }
     if (needSetLanguageEnabledMaps[lang]) {
@@ -816,8 +813,8 @@ void cmGlobalGenerator::EnableLanguage(
         testLang += "Compiler.cmake";
         std::string ifpath = mf->GetModulesFile(testLang);
         if (!mf->ReadListFile(ifpath)) {
-          cmSystemTools::Error("Could not find cmake module file: ",
-                               testLang.c_str());
+          cmSystemTools::Error("Could not find cmake module file: " +
+                               testLang);
         }
         std::string compilerWorks = "CMAKE_";
         compilerWorks += lang;
@@ -1706,8 +1703,8 @@ void cmGlobalGenerator::CheckTargetProperties()
     cmSystemTools::Error("The following variables are used in this project, "
                          "but they are set to NOTFOUND.\n"
                          "Please set them or make sure they are set and "
-                         "tested correctly in the CMake files:\n",
-                         notFoundVars.c_str());
+                         "tested correctly in the CMake files:\n" +
+                         notFoundVars);
   }
 }
 
@@ -1851,8 +1848,8 @@ int cmGlobalGenerator::Build(int jobs, const std::string& 
/*unused*/,
                                        timeout)) {
     cmSystemTools::SetRunCommandHideConsole(hideconsole);
     cmSystemTools::Error(
-      "Generator: execution of make failed. Make command was: ",
-      makeCommandStr.c_str());
+      "Generator: execution of make failed. Make command was: " +
+      makeCommandStr);
     output += *outputPtr;
     output += "\nGenerator: execution of make failed. Make command was: " +
       makeCommandStr + "\n";
diff --git a/Source/cmGlobalNinjaGenerator.cxx 
b/Source/cmGlobalNinjaGenerator.cxx
index 31bcacf..b78ffa9 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -136,16 +136,16 @@ void cmGlobalNinjaGenerator::WriteBuild(
   // Make sure there is a rule.
   if (rule.empty()) {
     cmSystemTools::Error("No rule for WriteBuildStatement! called "
-                         "with comment: ",
-                         comment.c_str());
+                         "with comment: " +
+                         comment);
     return;
   }
 
   // Make sure there is at least one output file.
   if (outputs.empty()) {
     cmSystemTools::Error("No output files for WriteBuildStatement! called "
-                         "with comment: ",
-                         comment.c_str());
+                         "with comment: " +
+                         comment);
     return;
   }
 
@@ -334,16 +334,16 @@ void cmGlobalNinjaGenerator::WriteRule(
   // Make sure the rule has a name.
   if (name.empty()) {
     cmSystemTools::Error("No name given for WriteRuleStatement! called "
-                         "with comment: ",
-                         comment.c_str());
+                         "with comment: " +
+                         comment);
     return;
   }
 
   // Make sure a command is given.
   if (command.empty()) {
     cmSystemTools::Error("No command given for WriteRuleStatement! called "
-                         "with comment: ",
-                         comment.c_str());
+                         "with comment: " +
+                         comment);
     return;
   }
 
@@ -376,7 +376,7 @@ void cmGlobalNinjaGenerator::WriteRule(
 
   if (!rspfile.empty()) {
     if (rspcontent.empty()) {
-      cmSystemTools::Error("No rspfile_content given!", comment.c_str());
+      cmSystemTools::Error("No rspfile_content given!" + comment);
       return;
     }
     cmGlobalNinjaGenerator::Indent(os, 1);
@@ -407,8 +407,8 @@ void cmGlobalNinjaGenerator::WriteVariable(std::ostream& os,
   // Make sure we have a name.
   if (name.empty()) {
     cmSystemTools::Error("No name given for WriteVariable! called "
-                         "with comment: ",
-                         comment.c_str());
+                         "with comment: " +
+                         comment);
     return;
   }
 
@@ -1652,8 +1652,7 @@ int 
cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
     } else if (cmHasLiteralPrefix(arg, "--ddi=")) {
       arg_ddi = arg.substr(6);
     } else {
-      cmSystemTools::Error("-E cmake_ninja_depends unknown argument: ",
-                           arg.c_str());
+      cmSystemTools::Error("-E cmake_ninja_depends unknown argument: " + arg);
       return 1;
     }
   }
@@ -1687,9 +1686,8 @@ int 
cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
       cmsys::ifstream tdif(arg_tdi.c_str(), std::ios::in | std::ios::binary);
       Json::Reader reader;
       if (!reader.parse(tdif, tdio, false)) {
-        cmSystemTools::Error("-E cmake_ninja_depends failed to parse ",
-                             arg_tdi.c_str(),
-                             reader.getFormattedErrorMessages().c_str());
+        cmSystemTools::Error("-E cmake_ninja_depends failed to parse " +
+                             arg_tdi + reader.getFormattedErrorMessages());
         return 1;
       }
     }
@@ -1715,8 +1713,7 @@ int 
cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
   std::set<std::string> defines;
   cmFortranParser parser(fc, includes, defines, info);
   if (!cmFortranParser_FilePush(&parser, arg_pp.c_str())) {
-    cmSystemTools::Error("-E cmake_ninja_depends failed to open ",
-                         arg_pp.c_str());
+    cmSystemTools::Error("-E cmake_ninja_depends failed to open " + arg_pp);
     return 1;
   }
   if (cmFortran_yyparse(parser.Scanner) != 0) {
@@ -1751,8 +1748,7 @@ int 
cmcmd_cmake_ninja_depends(std::vector<std::string>::const_iterator argBeg,
   cmGeneratedFileStream ddif(arg_ddi);
   ddif << ddi;
   if (!ddif) {
-    cmSystemTools::Error("-E cmake_ninja_depends failed to write ",
-                         arg_ddi.c_str());
+    cmSystemTools::Error("-E cmake_ninja_depends failed to write " + arg_ddi);
     return 1;
   }
   return 0;
@@ -1795,9 +1791,8 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
     cmsys::ifstream ddif(arg_ddi.c_str(), std::ios::in | std::ios::binary);
     Json::Reader reader;
     if (!reader.parse(ddif, ddio, false)) {
-      cmSystemTools::Error("-E cmake_ninja_dyndep failed to parse ",
-                           arg_ddi.c_str(),
-                           reader.getFormattedErrorMessages().c_str());
+      cmSystemTools::Error("-E cmake_ninja_dyndep failed to parse " + arg_ddi +
+                           reader.getFormattedErrorMessages());
       return false;
     }
 
@@ -1828,9 +1823,9 @@ bool cmGlobalNinjaGenerator::WriteDyndepFile(
     cmsys::ifstream ltmf(ltmn.c_str(), std::ios::in | std::ios::binary);
     Json::Reader reader;
     if (ltmf && !reader.parse(ltmf, ltm, false)) {
-      cmSystemTools::Error("-E cmake_ninja_dyndep failed to parse ",
-                           linked_target_dir.c_str(),
-                           reader.getFormattedErrorMessages().c_str());
+      cmSystemTools::Error("-E cmake_ninja_dyndep failed to parse " +
+                           linked_target_dir +
+                           reader.getFormattedErrorMessages());
       return false;
     }
     if (ltm.isObject()) {
@@ -1911,8 +1906,7 @@ int 
cmcmd_cmake_ninja_dyndep(std::vector<std::string>::const_iterator argBeg,
                cmHasLiteralSuffix(arg, ".ddi")) {
       arg_ddis.push_back(arg);
     } else {
-      cmSystemTools::Error("-E cmake_ninja_dyndep unknown argument: ",
-                           arg.c_str());
+      cmSystemTools::Error("-E cmake_ninja_dyndep unknown argument: " + arg);
       return 1;
     }
   }
@@ -1931,9 +1925,8 @@ int 
cmcmd_cmake_ninja_dyndep(std::vector<std::string>::const_iterator argBeg,
     cmsys::ifstream tdif(arg_tdi.c_str(), std::ios::in | std::ios::binary);
     Json::Reader reader;
     if (!reader.parse(tdif, tdio, false)) {
-      cmSystemTools::Error("-E cmake_ninja_dyndep failed to parse ",
-                           arg_tdi.c_str(),
-                           reader.getFormattedErrorMessages().c_str());
+      cmSystemTools::Error("-E cmake_ninja_dyndep failed to parse " + arg_tdi +
+                           reader.getFormattedErrorMessages());
       return 1;
     }
   }
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx 
b/Source/cmGlobalVisualStudio8Generator.cxx
index f6db018..ceb56d1 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -205,7 +205,7 @@ bool cmGlobalVisualStudio8Generator::AddCheckTarget()
           "Checking Build System", no_working_directory, true, false)) {
       gt->AddSource(file->GetFullPath());
     } else {
-      cmSystemTools::Error("Error adding rule for ", stamps[0].c_str());
+      cmSystemTools::Error("Error adding rule for " + stamps[0]);
     }
   }
 
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx 
b/Source/cmGlobalVisualStudioGenerator.cxx
index 1922906..45927c9 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -918,7 +918,7 @@ void cmGlobalVisualStudioGenerator::AddSymbolExportCommand(
   cmdl.push_back(objs_file);
   cmGeneratedFileStream fout(objs_file.c_str());
   if (!fout) {
-    cmSystemTools::Error("could not open ", objs_file.c_str());
+    cmSystemTools::Error("could not open " + objs_file);
     return;
   }
 
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 8393165..90f1c00 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -366,8 +366,8 @@ void cmLocalGenerator::ProcessEvaluationFiles(
                           std::back_inserter(intersection));
     if (!intersection.empty()) {
       cmSystemTools::Error("Files to be generated by multiple different "
-                           "commands: ",
-                           cmWrap('"', intersection, '"', " ").c_str());
+                           "commands: " +
+                           cmWrap('"', intersection, '"', " "));
       return;
     }
 
@@ -1168,8 +1168,8 @@ void cmLocalGenerator::GetTargetFlags(
       }
       if (linkLanguage.empty()) {
         cmSystemTools::Error(
-          "CMake can not determine linker language for target: ",
-          target->GetName().c_str());
+          "CMake can not determine linker language for target: " +
+          target->GetName());
         return;
       }
       this->AddLanguageFlagsForLinking(flags, target, linkLanguage, buildType);
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 4dc04d5..f4e3ed8 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -232,8 +232,8 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os)
         os << "  depth = " << jobs << std::endl;
         os << std::endl;
       } else {
-        cmSystemTools::Error("Invalid pool defined by property 'JOB_POOLS': ",
-                             pool.c_str());
+        cmSystemTools::Error("Invalid pool defined by property 'JOB_POOLS': " +
+                             pool);
       }
     }
   }
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx 
b/Source/cmLocalUnixMakefileGenerator3.cxx
index 7eb4a03..f8e7441 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1054,7 +1054,7 @@ void cmLocalUnixMakefileGenerator3::AppendCleanCommand(
   std::string cleanfilePath = cmSystemTools::CollapseFullPath(cleanfile);
   cmsys::ofstream fout(cleanfilePath.c_str());
   if (!fout) {
-    cmSystemTools::Error("Could not create ", cleanfilePath.c_str());
+    cmSystemTools::Error("Could not create " + cleanfilePath);
   }
   if (!files.empty()) {
     fout << "file(REMOVE_RECURSE\n";
diff --git a/Source/cmLocalVisualStudio7Generator.cxx 
b/Source/cmLocalVisualStudio7Generator.cxx
index 9f18e8f..a497308 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -118,8 +118,8 @@ void cmLocalVisualStudio7Generator::WriteProjectFiles()
   // If not an in source build, then create the output directory
   if (this->GetCurrentBinaryDirectory() != this->GetSourceDirectory()) {
     if (!cmSystemTools::MakeDirectory(this->GetCurrentBinaryDirectory())) {
-      cmSystemTools::Error("Error creating directory ",
-                           this->GetCurrentBinaryDirectory().c_str());
+      cmSystemTools::Error("Error creating directory " +
+                           this->GetCurrentBinaryDirectory());
     }
   }
 
@@ -283,7 +283,7 @@ cmSourceFile* 
cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
     file->GetFullPath();
     return file;
   } else {
-    cmSystemTools::Error("Error adding rule for ", makefileIn.c_str());
+    cmSystemTools::Error("Error adding rule for " + makefileIn);
     return nullptr;
   }
 }
@@ -654,8 +654,8 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(
                             : target->GetLinkerLanguage(configName));
     if (linkLanguage.empty()) {
       cmSystemTools::Error(
-        "CMake can not determine linker language for target: ",
-        target->GetName().c_str());
+        "CMake can not determine linker language for target: " +
+        target->GetName());
       return;
     }
     langForClCompile = linkLanguage;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 0a0501b..f66999f 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -959,9 +959,8 @@ cmSourceFile* cmMakefile::AddCustomCommandToOutput(
     if (file && file->GetCustomCommand() && !replace) {
       // The rule file already exists.
       if (commandLines != file->GetCustomCommand()->GetCommandLines()) {
-        cmSystemTools::Error("Attempt to add a custom rule to output \"",
-                             outName.c_str(),
-                             "\" which already has a custom rule.");
+        cmSystemTools::Error("Attempt to add a custom rule to output \"" +
+                             outName + "\" which already has a custom rule.");
       }
       return file;
     }
@@ -1101,8 +1100,8 @@ void cmMakefile::AddCustomCommandOldStyle(
         ti->second.AddSource(sf->GetFullPath());
       } else {
         cmSystemTools::Error("Attempt to add a custom rule to a target "
-                             "that does not exist yet for target ",
-                             target.c_str());
+                             "that does not exist yet for target " +
+                             target);
         return;
       }
     }
@@ -1189,8 +1188,7 @@ cmTarget* cmMakefile::AddUtilityCommand(
     if (sf) {
       sf->SetProperty("SYMBOLIC", "1");
     } else {
-      cmSystemTools::Error("Could not get source file entry for ",
-                           force.c_str());
+      cmSystemTools::Error("Could not get source file entry for " + force);
     }
 
     // Always create the byproduct sources and mark them generated.
@@ -2445,8 +2443,9 @@ const std::string& cmMakefile::GetRequiredDefinition(
   const std::string* def = GetDef(name);
   if (!def) {
     cmSystemTools::Error("Error required internal CMake variable not "
-                         "set, cmake may not be built correctly.\n",
-                         "Missing variable is:\n", name.c_str());
+                         "set, cmake may not be built correctly.\n"
+                         "Missing variable is:\n" +
+                         name);
     return empty;
   }
   return *def;
@@ -3779,15 +3778,15 @@ int cmMakefile::ConfigureFile(const std::string& infile,
     tempOutputFile += ".tmp";
     cmsys::ofstream fout(tempOutputFile.c_str(), omode);
     if (!fout) {
-      cmSystemTools::Error("Could not open file for write in copy operation ",
-                           tempOutputFile.c_str());
+      cmSystemTools::Error("Could not open file for write in copy operation " +
+                           tempOutputFile);
       cmSystemTools::ReportLastSystemError("");
       return 0;
     }
     cmsys::ifstream fin(sinfile.c_str());
     if (!fin) {
-      cmSystemTools::Error("Could not open file for read in copy operation ",
-                           sinfile.c_str());
+      cmSystemTools::Error("Could not open file for read in copy operation " +
+                           sinfile);
       return 0;
     }
 
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx 
b/Source/cmMakefileExecutableTargetGenerator.cxx
index 572270a..984cd85 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -370,8 +370,8 @@ void 
cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
 
   // Make sure we have a link language.
   if (linkLanguage.empty()) {
-    cmSystemTools::Error("Cannot determine link language for target \"",
-                         this->GeneratorTarget->GetName().c_str(), "\".");
+    cmSystemTools::Error("Cannot determine link language for target \"" +
+                         this->GeneratorTarget->GetName() + "\".");
     return;
   }
 
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx 
b/Source/cmMakefileLibraryTargetGenerator.cxx
index ed2fd68..44e6547 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -462,8 +462,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
 
   // Make sure we have a link language.
   if (linkLanguage.empty()) {
-    cmSystemTools::Error("Cannot determine link language for target \"",
-                         this->GeneratorTarget->GetName().c_str(), "\".");
+    cmSystemTools::Error("Cannot determine link language for target \"" +
+                         this->GeneratorTarget->GetName() + "\".");
     return;
   }
 
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx 
b/Source/cmNinjaNormalTargetGenerator.cxx
index 3784313..3264237 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -68,8 +68,8 @@ void cmNinjaNormalTargetGenerator::Generate()
 {
   if (this->TargetLinkLanguage.empty()) {
     cmSystemTools::Error("CMake can not determine linker language for "
-                         "target: ",
-                         this->GetGeneratorTarget()->GetName().c_str());
+                         "target: " +
+                         this->GetGeneratorTarget()->GetName());
     return;
   }
 
diff --git a/Source/cmOutputRequiredFilesCommand.cxx 
b/Source/cmOutputRequiredFilesCommand.cxx
index e0c1dad..cb9433f 100644
--- a/Source/cmOutputRequiredFilesCommand.cxx
+++ b/Source/cmOutputRequiredFilesCommand.cxx
@@ -166,7 +166,7 @@ protected:
   {
     cmsys::ifstream fin(info->FullPath.c_str());
     if (!fin) {
-      cmSystemTools::Error("error can not open ", info->FullPath.c_str());
+      cmSystemTools::Error("error can not open " + info->FullPath);
       return;
     }
 
@@ -181,7 +181,7 @@ protected:
           qstart = line.find('<', 8);
           // if a < is not found then move on
           if (qstart == std::string::npos) {
-            cmSystemTools::Error("unknown include directive ", line.c_str());
+            cmSystemTools::Error("unknown include directive " + line);
             continue;
           }
           qend = line.find('>', qstart + 1);
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index f0e8077..1ca2360 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1425,12 +1425,12 @@ std::string cmSystemTools::RelativePath(std::string 
const& local,
                                         std::string const& remote)
 {
   if (!cmSystemTools::FileIsFullPath(local)) {
-    cmSystemTools::Error("RelativePath must be passed a full path to local: ",
-                         local.c_str());
+    cmSystemTools::Error("RelativePath must be passed a full path to local: " +
+                         local);
   }
   if (!cmSystemTools::FileIsFullPath(remote)) {
-    cmSystemTools::Error("RelativePath must be passed a full path to remote: ",
-                         remote.c_str());
+    cmSystemTools::Error(
+      "RelativePath must be passed a full path to remote: " + remote);
   }
   return cmsys::SystemTools::RelativePath(local, remote);
 }
@@ -1909,8 +1909,8 @@ bool extract_tar(const char* outFileName, bool verbose, 
bool extract)
       else {
         cmSystemTools::Error("Problem with archive_write_header(): ",
                              archive_error_string(ext));
-        cmSystemTools::Error("Current file: ",
-                             cm_archive_entry_pathname(entry).c_str());
+        cmSystemTools::Error("Current file: " +
+                             cm_archive_entry_pathname(entry));
         break;
       }
     }
diff --git a/Source/cmUseMangledMesaCommand.cxx 
b/Source/cmUseMangledMesaCommand.cxx
index 9648b21..e4a1b5f 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -19,7 +19,7 @@ bool 
cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
     this->SetError("called with incorrect number of arguments");
     return false;
   }
-  const char* inputDir = args[0].c_str();
+  const std::string& inputDir = args[0];
   std::string glh = inputDir;
   glh += "/";
   glh += "gl.h";
@@ -34,7 +34,7 @@ bool 
cmUseMangledMesaCommand::InitialPass(std::vector<std::string> const& args,
   std::vector<std::string> files;
   cmSystemTools::Glob(inputDir, "\\.h$", files);
   if (files.empty()) {
-    cmSystemTools::Error("Could not open Mesa Directory ", inputDir);
+    cmSystemTools::Error("Could not open Mesa Directory " + inputDir);
     return false;
   }
   cmSystemTools::MakeDirectory(destDir);
@@ -60,8 +60,8 @@ void cmUseMangledMesaCommand::CopyAndFullPathMesaHeader(const 
char* source,
   tempOutputFile += ".tmp";
   cmsys::ofstream fout(tempOutputFile.c_str());
   if (!fout) {
-    cmSystemTools::Error("Could not open file for write in copy operation: ",
-                         tempOutputFile.c_str(), outdir);
+    cmSystemTools::Error("Could not open file for write in copy operation: " +
+                         tempOutputFile + outdir);
     cmSystemTools::ReportLastSystemError("");
     return;
   }
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx 
b/Source/cmVisualStudio10TargetGenerator.cxx
index 6ee82f4..b655815 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1321,8 +1321,7 @@ void cmVisualStudio10TargetGenerator::WriteCustomRule(
         std::string error = "Could not create file: [";
         error += sourcePath;
         error += "]  ";
-        cmSystemTools::Error(error.c_str(),
-                             cmSystemTools::GetLastSystemError().c_str());
+        cmSystemTools::Error(error + cmSystemTools::GetLastSystemError());
       }
     }
   }
@@ -2514,8 +2513,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions(
     this->GeneratorTarget->GetLinkerLanguage(configName);
   if (linkLanguage.empty()) {
     cmSystemTools::Error(
-      "CMake can not determine linker language for target: ",
-      this->Name.c_str());
+      "CMake can not determine linker language for target: " + this->Name);
     return false;
   }
 
@@ -3345,8 +3343,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
   const std::string& linkLanguage = linkClosure->LinkerLanguage;
   if (linkLanguage.empty()) {
     cmSystemTools::Error(
-      "CMake can not determine linker language for target: ",
-      this->Name.c_str());
+      "CMake can not determine linker language for target: " + this->Name);
     return false;
   }
 
@@ -3391,8 +3388,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
     this->GeneratorTarget->GetLinkInformation(config);
   if (!pcli) {
     cmSystemTools::Error(
-      "CMake can not compute cmComputeLinkInformation for target: ",
-      this->Name.c_str());
+      "CMake can not compute cmComputeLinkInformation for target: " +
+      this->Name);
     return false;
   }
   cmComputeLinkInformation& cli = *pcli;
@@ -3572,8 +3569,8 @@ bool cmVisualStudio10TargetGenerator::ComputeLibOptions(
     this->GeneratorTarget->GetLinkInformation(config);
   if (!pcli) {
     cmSystemTools::Error(
-      "CMake can not compute cmComputeLinkInformation for target: ",
-      this->Name.c_str());
+      "CMake can not compute cmComputeLinkInformation for target: " +
+      this->Name);
     return false;
   }
 
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index ab783c7..f6f0a95 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -788,13 +788,13 @@ void cmake::SetArgs(const std::vector<std::string>& args)
       }
       cmGlobalGenerator* gen = this->CreateGlobalGenerator(value);
       if (!gen) {
-        const char* kdevError = nullptr;
+        std::string kdevError;
         if (value.find("KDevelop3", 0) != std::string::npos) {
           kdevError = "\nThe KDevelop3 generator is not supported anymore.";
         }
 
-        cmSystemTools::Error("Could not create named generator ",
-                             value.c_str(), kdevError);
+        cmSystemTools::Error("Could not create named generator " + value +
+                             kdevError);
         this->PrintGeneratorList();
       } else {
         this->SetGlobalGenerator(gen);
@@ -938,8 +938,8 @@ int cmake::AddCMakePaths()
     cmSystemTools::Error(
       "Could not find CMAKE_ROOT !!!\n"
       "CMake has most likely not been installed correctly.\n"
-      "Modules directory not found in\n",
-      cmSystemTools::GetCMakeRoot().c_str());
+      "Modules directory not found in\n" +
+      cmSystemTools::GetCMakeRoot());
     return 0;
   }
   this->AddCacheEntry("CMAKE_ROOT", cmSystemTools::GetCMakeRoot().c_str(),
@@ -2016,8 +2016,8 @@ void cmake::UpdateConversionPathTable()
   if (tablepath) {
     cmsys::ifstream table(tablepath->c_str());
     if (!table) {
-      cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to ",
-                           tablepath->c_str(), ". CMake can not open file.");
+      cmSystemTools::Error("CMAKE_PATH_TRANSLATION_FILE set to " + *tablepath +
+                           ". CMake can not open file.");
       cmSystemTools::ReportLastSystemError("CMake can not open file.");
     } else {
       std::string a, b;
@@ -2325,8 +2325,7 @@ int cmake::GetSystemInformation(std::vector<std::string>& 
args)
       }
       cmGlobalGenerator* gen = this->CreateGlobalGenerator(value);
       if (!gen) {
-        cmSystemTools::Error("Could not create named generator ",
-                             value.c_str());
+        cmSystemTools::Error("Could not create named generator " + value);
         this->PrintGeneratorList();
       } else {
         this->SetGlobalGenerator(gen);
@@ -2473,7 +2472,7 @@ static bool cmakeCheckStampFile(const std::string& 
stampName, bool verbose)
     return true;
   }
   cmSystemTools::RemoveFile(stampTemp);
-  cmSystemTools::Error("Cannot restore timestamp ", stampName.c_str());
+  cmSystemTools::Error("Cannot restore timestamp " + stampName);
   return false;
 }
 
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx
index adfce37..1139a4c 100644
--- a/Source/cmcmd.cxx
+++ b/Source/cmcmd.cxx
@@ -817,8 +817,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& 
args)
     if (args[1] == "chdir" && args.size() >= 4) {
       std::string const& directory = args[2];
       if (!cmSystemTools::FileExists(directory)) {
-        cmSystemTools::Error("Directory does not exist for chdir command: ",
-                             args[2].c_str());
+        cmSystemTools::Error("Directory does not exist for chdir command: " +
+                             args[2]);
         return 1;
       }
 
@@ -1065,12 +1065,12 @@ int 
cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
                         format) != cm::cend(knownFormats);
 
             if (!isKnown) {
-              cmSystemTools::Error("Unknown -E tar --format= argument: ",
-                                   format.c_str());
+              cmSystemTools::Error("Unknown -E tar --format= argument: " +
+                                   format);
               return 1;
             }
           } else {
-            cmSystemTools::Error("Unknown option to -E tar: ", arg.c_str());
+            cmSystemTools::Error("Unknown option to -E tar: " + arg);
             return 1;
           }
         } else {
@@ -1094,8 +1094,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& 
args)
         ++nCompress;
       }
       if ((format == "7zip" || format == "zip") && nCompress > 0) {
-        cmSystemTools::Error("Can not use compression flags with format: ",
-                             format.c_str());
+        cmSystemTools::Error("Can not use compression flags with format: " +
+                             format);
         return 1;
       }
       if (nCompress > 1) {
@@ -1109,18 +1109,18 @@ int 
cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args)
 
       if (flags.find_first_of('t') != std::string::npos) {
         if (!cmSystemTools::ListTar(outFile.c_str(), verbose)) {
-          cmSystemTools::Error("Problem listing tar: ", outFile.c_str());
+          cmSystemTools::Error("Problem listing tar: " + outFile);
           return 1;
         }
       } else if (flags.find_first_of('c') != std::string::npos) {
         if (!cmSystemTools::CreateTar(outFile.c_str(), files, compress,
                                       verbose, mtime, format)) {
-          cmSystemTools::Error("Problem creating tar: ", outFile.c_str());
+          cmSystemTools::Error("Problem creating tar: " + outFile);
           return 1;
         }
       } else if (flags.find_first_of('x') != std::string::npos) {
         if (!cmSystemTools::ExtractTar(outFile.c_str(), verbose)) {
-          cmSystemTools::Error("Problem extracting tar: ", outFile.c_str());
+          cmSystemTools::Error("Problem extracting tar: " + outFile);
           return 1;
         }
 #ifdef WIN32

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

Summary of changes:
 Help/command/try_compile.rst                   | 44 ++++++++++++---------
 Help/command/try_run.rst                       | 14 +++----
 Help/release/3.14.rst                          |  5 +++
 Modules/CheckCXXSourceRuns.cmake               |  7 +++-
 Modules/CheckFortranSourceRuns.cmake           |  7 +++-
 Source/CPack/cmCPackGenerator.cxx              |  3 +-
 Source/CTest/cmCTestBZR.cxx                    |  2 +-
 Source/CTest/cmCTestBuildHandler.cxx           | 11 +++---
 Source/CTest/cmCTestBuildHandler.h             |  2 +-
 Source/CTest/cmCTestCVS.cxx                    |  2 +-
 Source/CTest/cmCTestConfigureHandler.cxx       |  2 +-
 Source/CTest/cmCTestCoverageHandler.cxx        |  4 +-
 Source/CTest/cmCTestGIT.cxx                    |  2 +-
 Source/CTest/cmCTestHG.cxx                     |  2 +-
 Source/CTest/cmCTestMemCheckHandler.cxx        |  2 +-
 Source/CTest/cmCTestMultiProcessHandler.cxx    |  4 +-
 Source/CTest/cmCTestP4.cxx                     |  5 +--
 Source/CTest/cmCTestSVN.cxx                    |  4 +-
 Source/CTest/cmCTestScriptHandler.cxx          | 17 ++++----
 Source/cmCTest.cxx                             |  2 +-
 Source/cmCTest.h                               |  5 ++-
 Source/cmCacheManager.cxx                      |  7 ++--
 Source/cmComputeLinkInformation.cxx            |  6 +--
 Source/cmCoreTryCompile.cxx                    |  4 +-
 Source/cmDependsC.cxx                          |  3 +-
 Source/cmExecProgramCommand.cxx                |  4 +-
 Source/cmExportLibraryDependenciesCommand.cxx  |  2 +-
 Source/cmGeneratedFileStream.cxx               |  6 +--
 Source/cmGhsMultiTargetGenerator.cxx           | 10 ++---
 Source/cmGlobVerificationManager.cxx           |  8 ++--
 Source/cmGlobalGenerator.cxx                   | 33 +++++++---------
 Source/cmGlobalNinjaGenerator.cxx              | 55 +++++++++++---------------
 Source/cmGlobalVisualStudio8Generator.cxx      |  2 +-
 Source/cmGlobalVisualStudioGenerator.cxx       |  2 +-
 Source/cmLocalGenerator.cxx                    | 10 ++---
 Source/cmLocalNinjaGenerator.cxx               |  4 +-
 Source/cmLocalUnixMakefileGenerator3.cxx       |  2 +-
 Source/cmLocalVisualStudio7Generator.cxx       | 10 ++---
 Source/cmMakefile.cxx                          | 25 ++++++------
 Source/cmMakefileExecutableTargetGenerator.cxx |  4 +-
 Source/cmMakefileLibraryTargetGenerator.cxx    |  4 +-
 Source/cmNinjaNormalTargetGenerator.cxx        | 37 ++++++++++++++++-
 Source/cmOutputRequiredFilesCommand.cxx        |  4 +-
 Source/cmRulePlaceholderExpander.cxx           | 15 +++++++
 Source/cmRulePlaceholderExpander.h             |  3 ++
 Source/cmSystemTools.cxx                       | 24 +++++------
 Source/cmSystemTools.h                         |  8 ++--
 Source/cmTryRunCommand.cxx                     |  5 +--
 Source/cmUseMangledMesaCommand.cxx             |  8 ++--
 Source/cmVisualStudio10TargetGenerator.cxx     | 17 ++++----
 Source/cmake.cxx                               | 19 +++++----
 Source/cmcmd.cxx                               | 20 +++++-----
 52 files changed, 279 insertions(+), 228 deletions(-)


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

Reply via email to