summaryrefslogtreecommitdiff
path: root/Source/cmGlobalNMakeMakefileGenerator.h
diff options
context:
space:
mode:
authorAmine Najahi <anajahi@mathworks.com>2021-04-22 20:26:30 +0100
committerBrad King <brad.king@kitware.com>2021-05-05 10:56:49 -0400
commitf3f57cc4edd528aaf0b8d8633d5f9990f0d804af (patch)
tree3ca9148977b9d0044fc5524e9fd3c1f93adeecad /Source/cmGlobalNMakeMakefileGenerator.h
parent186c9bff5342c1e8e73fce9cf361b6de5dda3f28 (diff)
downloadcmake-f3f57cc4edd528aaf0b8d8633d5f9990f0d804af.tar.gz
NMake: Use UTF-8 with BOM if supported by nmake
Fixes: #21792
Diffstat (limited to 'Source/cmGlobalNMakeMakefileGenerator.h')
-rw-r--r--Source/cmGlobalNMakeMakefileGenerator.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h
index ed52378347..402b89fda9 100644
--- a/Source/cmGlobalNMakeMakefileGenerator.h
+++ b/Source/cmGlobalNMakeMakefileGenerator.h
@@ -31,7 +31,7 @@ public:
/** Get encoding used by generator for makefile files */
codecvt::Encoding GetMakefileEncoding() const override
{
- return codecvt::ANSI;
+ return this->NMakeSupportsUTF8 ? codecvt::UTF8_WITH_BOM : codecvt::ANSI;
}
/** Get the documentation entry for this generator. */