summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-18 14:54:51 (GMT)
committerVitaly Stakhovsky <vvs31415@gitlab.org>2019-02-19 01:48:19 (GMT)
commit0281f9a4cad6e189601a87c9ccfba8c54e71e14b (patch)
tree7cb6ecd89a38397e4ca191078fab91f1875eedba /Source/cmMakefile.cxx
parentbafd0ffa987bea9216e7722c027478f26d5e8f6a (diff)
downloadCMake-0281f9a4cad6e189601a87c9ccfba8c54e71e14b.zip
CMake-0281f9a4cad6e189601a87c9ccfba8c54e71e14b.tar.gz
CMake-0281f9a4cad6e189601a87c9ccfba8c54e71e14b.tar.bz2
cmMakefile::ConfigureFile: Accept `std::string` parameters
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);