summaryrefslogtreecommitdiff
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorClinton Stimpson <clinton@elemtech.com>2014-03-14 08:48:42 -0600
committerClinton Stimpson <clinton@elemtech.com>2014-03-14 08:48:42 -0600
commitee8cef8725486519a7ab47eb16208d4d64e0ab99 (patch)
treebc967cae43b43a6fa756349622a34152dcd6e0b3 /Source/cmGlobalVisualStudio7Generator.cxx
parent91fd99b86532dbf35d8c7396654b9beac058c8f3 (diff)
downloadcmake-ee8cef8725486519a7ab47eb16208d4d64e0ab99.tar.gz
Encoding: If configured, write Visual Studio project files as UTF-8.
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 320b4403a2..42033c5be4 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -873,7 +873,8 @@ cmGlobalVisualStudio7Generator::WriteUtilityDepend(cmTarget const* target)
std::string guid = this->GetGUID(pname.c_str());
fout <<
- "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n"
+ "<?xml version=\"1.0\" encoding = \""
+ << this->Encoding() << "\"?>\n"
"<VisualStudioProject\n"
"\tProjectType=\"Visual C++\"\n"
"\tVersion=\"" << this->GetIDEVersion() << "0\"\n"
@@ -1038,3 +1039,14 @@ cmIDEFlagTable const* cmGlobalVisualStudio7Generator::GetExtraFlagTableVS7()
{
return cmVS7ExtraFlagTable;
}
+
+std::string cmGlobalVisualStudio7Generator::Encoding()
+{
+ std::ostringstream encoding;
+#ifdef CMAKE_ENCODING_UTF8
+ encoding << "UTF-8";
+#else
+ encoding << "Windows-1252";
+#endif
+ return encoding.str();
+}