diff options
author | Brad King <brad.king@kitware.com> | 2022-10-28 19:52:33 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-28 20:23:25 -0400 |
commit | 328c15189d661503fbf6561731e550064e6a5567 (patch) | |
tree | 876f941e11bc55249e49a212687e191d682317a9 /Source/cmGeneratedFileStream.h | |
parent | 59ae2543165b836d01b88fe0ba4e22ecd549e239 (diff) | |
download | cmake-328c15189d661503fbf6561731e550064e6a5567.tar.gz |
cmGeneratedFileStream: Add support for a temporary alternate encoding
The Ninja generator needs to be able to write some file content in a
different encoding than the rest of the file. Add a method to do this.
Diffstat (limited to 'Source/cmGeneratedFileStream.h')
-rw-r--r-- | Source/cmGeneratedFileStream.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index bb7e3bf52f..77fd7ef46a 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -148,6 +148,12 @@ public: void SetTempExt(std::string const& ext); /** + * Write a specific string using an alternate encoding. + * Afterward, the original encoding is restored. + */ + void WriteAltEncoding(std::string const& data, Encoding encoding); + + /** * Writes the given string directly to the file without changing the * encoding. */ |