diff options
author | Gustavo Varo <gustavo.varo@gmail.com> | 2021-06-16 22:05:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-17 17:44:22 (GMT) |
commit | 9ba99a1203efea8e5c3977514b22f6204507f17b (patch) | |
tree | 90f59ebe4cc4cda70077096ab9959ffb1edc1378 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | b0f830ced6552b055bc73de470a4631aa3a14430 (diff) | |
download | CMake-9ba99a1203efea8e5c3977514b22f6204507f17b.zip CMake-9ba99a1203efea8e5c3977514b22f6204507f17b.tar.gz CMake-9ba99a1203efea8e5c3977514b22f6204507f17b.tar.bz2 |
VS: Add support for Utf8Enconding when using VS 16.10+
On VS 16.10 Preview 2 or above, generate `UseUtf8Encoding`
instead of `StdOutEncoding=UTF-8` in `.vcxproj` files.
Fixes: #22032
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index b79c6fd..11a8b1f 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -5115,7 +5115,9 @@ std::string cmVisualStudio10TargetGenerator::GetCMakeFilePath( void cmVisualStudio10TargetGenerator::WriteStdOutEncodingUtf8(Elem& e1) { - if (this->GlobalGenerator->IsStdOutEncodingSupported()) { + if (this->GlobalGenerator->IsUtf8EncodingSupported()) { + e1.Element("UseUtf8Encoding", "Always"); + } else if (this->GlobalGenerator->IsStdOutEncodingSupported()) { e1.Element("StdOutEncoding", "UTF-8"); } } |