diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-18 14:54:51 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-02-19 01:48:19 (GMT) |
commit | 0281f9a4cad6e189601a87c9ccfba8c54e71e14b (patch) | |
tree | 7cb6ecd89a38397e4ca191078fab91f1875eedba /Source/cmMakefile.cxx | |
parent | bafd0ffa987bea9216e7722c027478f26d5e8f6a (diff) | |
download | CMake-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.cxx | 11 |
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); |