[Cmake-commits] CMake branch, next, updated. v3.1.0-1597-gcbda3a7
Clinton Stimpson
clinton at elemtech.com
Thu Jan 8 22:47:54 EST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via cbda3a77ec426b6340d705eeb153f53346b53191 (commit)
via 61cf781a6216c55a60fb73d4fb5fab76b1e7fc34 (commit)
from def4979cf2be3342b9e46d44da13d2b51670f685 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbda3a77ec426b6340d705eeb153f53346b53191
commit cbda3a77ec426b6340d705eeb153f53346b53191
Merge: def4979 61cf781
Author: Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Thu Jan 8 22:47:53 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jan 8 22:47:53 2015 -0500
Merge topic 'sln-bom' into next
61cf781a Encoding: Write Visual Studio solution file with BOM.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=61cf781a6216c55a60fb73d4fb5fab76b1e7fc34
commit 61cf781a6216c55a60fb73d4fb5fab76b1e7fc34
Author: Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Fri Dec 26 21:15:29 2014 -0700
Commit: Clinton Stimpson <clinton at elemtech.com>
CommitDate: Fri Dec 26 21:15:29 2014 -0700
Encoding: Write Visual Studio solution file with BOM.
When configured to use UTF-8 internally, add a UTF-8 BOM
to generated .sln files for Visual Studio to correctly
handle them.
Otherwise, some versions of Visual Studio will read them
as ANSI encoded files.
diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx
index a67a649..64f9cee 100644
--- a/Source/cmGlobalVisualStudio71Generator.cxx
+++ b/Source/cmGlobalVisualStudio71Generator.cxx
@@ -93,6 +93,11 @@ void cmGlobalVisualStudio71Generator
cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators)
{
+#ifdef CMAKE_ENCODING_UTF8
+ // Add UTF-8 BOM for .sln file to indicate encoding
+ const unsigned char utf8_bom[3] = {0xEF,0xBB,0xBF};
+ fout.write(reinterpret_cast<const char*>(utf8_bom), 3);
+#endif
// Write out the header for a SLN file
this->WriteSLNHeader(fout);
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 401e475..0eb7d2c 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -558,6 +558,11 @@ void cmGlobalVisualStudio7Generator
cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators)
{
+#ifdef CMAKE_ENCODING_UTF8
+ // Add UTF-8 BOM for .sln file to indicate encoding
+ const unsigned char utf8_bom[3] = {0xEF,0xBB,0xBF};
+ fout.write(reinterpret_cast<const char*>(utf8_bom), 3);
+#endif
// Write out the header for a SLN file
this->WriteSLNHeader(fout);
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalVisualStudio71Generator.cxx | 5 +++++
Source/cmGlobalVisualStudio7Generator.cxx | 5 +++++
2 files changed, 10 insertions(+)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list