summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-02-20 14:01:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-02-20 14:03:48 (GMT)
commitc2f6da3399efa1448eadbae65311795ced3f8930 (patch)
tree22029ba1982f7d4964772abfc78a0fc1a9f1d44a /Source/cmMakefile.cxx
parentb38023f958325fedd99d5480149f4958e721fdd5 (diff)
parent0281f9a4cad6e189601a87c9ccfba8c54e71e14b (diff)
downloadCMake-c2f6da3399efa1448eadbae65311795ced3f8930.zip
CMake-c2f6da3399efa1448eadbae65311795ced3f8930.tar.gz
CMake-c2f6da3399efa1448eadbae65311795ced3f8930.tar.bz2
Merge topic 'configurefile-stdstring'
0281f9a4ca cmMakefile::ConfigureFile: Accept `std::string` parameters Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2982
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 560181f..0a0501b 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3729,22 +3729,23 @@ void cmMakefile::ConfigureString(const std::string& input, std::string& output,
lineNumber, true, true);
}
-int cmMakefile::ConfigureFile(const char* infile, const char* outfile,
- bool copyonly, bool atOnly, bool escapeQuotes,
+int cmMakefile::ConfigureFile(const std::string& infile,
+ const std::string& outfile, bool copyonly,
+ bool atOnly, bool escapeQuotes,
cmNewLineStyle newLine)
{
int res = 1;
if (!this->CanIWriteThisFile(outfile)) {
- cmSystemTools::Error("Attempt to write file: ", outfile,
+ cmSystemTools::Error("Attempt to write file: " + outfile +
" into a source directory.");
return 0;
}
if (!cmSystemTools::FileExists(infile)) {
- cmSystemTools::Error("File ", infile, " does not exist.");
+ cmSystemTools::Error("File " + infile + " does not exist.");
return 0;
}
std::string soutfile = outfile;
- std::string sinfile = infile;
+ const std::string& sinfile = infile;
this->AddCMakeDependFile(sinfile);
cmSystemTools::ConvertToUnixSlashes(soutfile);