[Cmake-commits] CMake branch, next, updated. v3.2.1-1250-g77b0fa6
Nils Gladitz
nilsgladitz at gmail.com
Fri Mar 27 07:23:49 EDT 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 77b0fa6c686212fc32c5f66c2a017b95e3c42405 (commit)
via 98a3b2e29ece5195e7948681a410bc5fae880a23 (commit)
via 685d179b8b8e0f0b98dbfd227f6ccd88b17749b0 (commit)
from df5c75d49d76488736841fe6e3bde1f4d85b0ece (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=77b0fa6c686212fc32c5f66c2a017b95e3c42405
commit 77b0fa6c686212fc32c5f66c2a017b95e3c42405
Merge: df5c75d 98a3b2e
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Mar 27 07:23:48 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Mar 27 07:23:48 2015 -0400
Merge topic 'wix-fix-utf8' into next
98a3b2e2 CPackWIX: Omit codepage conversion when internal encoding is already UTF-8.
685d179b CMake Nightly Date Stamp
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98a3b2e29ece5195e7948681a410bc5fae880a23
commit 98a3b2e29ece5195e7948681a410bc5fae880a23
Author: Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Fri Mar 27 12:22:15 2015 +0100
Commit: Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Fri Mar 27 12:22:15 2015 +0100
CPackWIX: Omit codepage conversion when internal encoding is already UTF-8.
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 257ce7a..99eabf2 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -430,7 +430,7 @@ void cmCPackWIXGenerator::AddDefinition(cmWIXSourceWriter& source,
tmp << name << "=\"" << value << '"';
source.AddProcessingInstruction("define",
- cmWIXSourceWriter::WindowsCodepageToUtf8(tmp.str()));
+ cmWIXSourceWriter::CMakeEncodingToUtf8(tmp.str()));
}
bool cmCPackWIXGenerator::CreateWiXSourceFiles()
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.cxx b/Source/CPack/WiX/cmWIXSourceWriter.cxx
index aad19da..219fca8 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXSourceWriter.cxx
@@ -10,6 +10,8 @@
See the License for more information.
============================================================================*/
+#include "cmStandardIncludes.h"
+
#include "cmWIXSourceWriter.h"
#include <CPack/cmCPackGenerator.h>
@@ -118,7 +120,7 @@ void cmWIXSourceWriter::AddProcessingInstruction(
void cmWIXSourceWriter::AddAttribute(
std::string const& key, std::string const& value)
{
- std::string utf8 = WindowsCodepageToUtf8(value);
+ std::string utf8 = CMakeEncodingToUtf8(value);
File << " " << key << "=\"" << EscapeAttributeValue(utf8) << '"';
}
@@ -132,8 +134,11 @@ void cmWIXSourceWriter::AddAttributeUnlessEmpty(
}
}
-std::string cmWIXSourceWriter::WindowsCodepageToUtf8(std::string const& value)
+std::string cmWIXSourceWriter::CMakeEncodingToUtf8(std::string const& value)
{
+#ifdef CMAKE_ENCODING_UTF8
+ return value;
+#else
if(value.empty())
{
return std::string();
@@ -167,6 +172,7 @@ std::string cmWIXSourceWriter::WindowsCodepageToUtf8(std::string const& value)
&utf8[0], static_cast<int>(utf8.size()), 0, 0);
return std::string(&utf8[0], utf8.size());
+#endif
}
diff --git a/Source/CPack/WiX/cmWIXSourceWriter.h b/Source/CPack/WiX/cmWIXSourceWriter.h
index 3957d96..3b9999c 100644
--- a/Source/CPack/WiX/cmWIXSourceWriter.h
+++ b/Source/CPack/WiX/cmWIXSourceWriter.h
@@ -43,7 +43,7 @@ public:
void AddAttributeUnlessEmpty(
std::string const& key, std::string const& value);
- static std::string WindowsCodepageToUtf8(std::string const& value);
+ static std::string CMakeEncodingToUtf8(std::string const& value);
protected:
cmCPackLog* Logger;
-----------------------------------------------------------------------
Summary of changes:
Source/CMakeVersion.cmake | 2 +-
Source/CPack/WiX/cmCPackWIXGenerator.cxx | 2 +-
Source/CPack/WiX/cmWIXSourceWriter.cxx | 10 ++++++++--
Source/CPack/WiX/cmWIXSourceWriter.h | 2 +-
4 files changed, 11 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list