[Cmake-commits] CMake branch, master, updated. v3.10.1-715-gf4a3143

Kitware Robot kwrobot at kitware.com
Mon Jan 8 10:45:03 EST 2018


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, master has been updated
       via  f4a314394039708e772374e54a31959f2de14825 (commit)
       via  8caec41e6e1debb2b54a63c370f6268ca76544ff (commit)
      from  a3bba2a5ad30287a22f2a700de6a60f0869b8dac (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f4a314394039708e772374e54a31959f2de14825
commit f4a314394039708e772374e54a31959f2de14825
Merge: a3bba2a 8caec41
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jan 8 15:44:39 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Jan 8 10:44:47 2018 -0500

    Merge topic 'execute_process_UTF8_keyword'
    
    8caec41e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Acked-by: Ben Boeckel <ben.boeckel at kitware.com>
    Merge-request: !1623


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8caec41e6e1debb2b54a63c370f6268ca76544ff
commit 8caec41e6e1debb2b54a63c370f6268ca76544ff
Author:     Craig Scott <craig.scott at crascit.com>
AuthorDate: Wed Dec 27 21:56:00 2017 +1100
Commit:     Craig Scott <craig.scott at crascit.com>
CommitDate: Wed Dec 27 21:56:00 2017 +1100

    execute_process: Allow UTF-8 as a synonym for the UTF8 keyword
    
    UTF-8 is the proper naming according to the UTF-8 RFC and is also the
    name used for a similar keyword in the file() command. This commit
    brings (backward compatible) consistency to the keyword names and allows
    the standard UTF-8 name to be used with execute_process(). The old UTF8
    keyword is still supported.

diff --git a/Help/command/execute_process.rst b/Help/command/execute_process.rst
index 799493f..716f457 100644
--- a/Help/command/execute_process.rst
+++ b/Help/command/execute_process.rst
@@ -90,8 +90,10 @@ Options:
    Use the ANSI codepage.
  ``OEM``
    Use the original equipment manufacturer (OEM) code page.
- ``UTF8``
-   Use the UTF-8 codepage.
+ ``UTF8`` or ``UTF-8``
+   Use the UTF-8 codepage. Prior to CMake 3.11.0, only ``UTF8`` was accepted
+   for this encoding. In CMake 3.11.0, ``UTF-8`` was added for consistency with
+   the `UTF-8 RFC <https://www.ietf.org/rfc/rfc3629>`_ naming convention.
 
 If more than one ``OUTPUT_*`` or ``ERROR_*`` option is given for the
 same pipe the precedence is not specified.
diff --git a/Source/cmProcessOutput.cxx b/Source/cmProcessOutput.cxx
index 617e1ca..8371706 100644
--- a/Source/cmProcessOutput.cxx
+++ b/Source/cmProcessOutput.cxx
@@ -13,7 +13,7 @@ cmProcessOutput::Encoding cmProcessOutput::FindEncoding(
   std::string const& name)
 {
   Encoding encoding = Auto;
-  if (name == "UTF8") {
+  if ((name == "UTF8") || (name == "UTF-8")) {
     encoding = UTF8;
   } else if (name == "NONE") {
     encoding = None;
diff --git a/Tests/CMakeLib/testEncoding.cxx b/Tests/CMakeLib/testEncoding.cxx
index 5e40638..11f6409 100644
--- a/Tests/CMakeLib/testEncoding.cxx
+++ b/Tests/CMakeLib/testEncoding.cxx
@@ -31,7 +31,7 @@ int main(int argc, char* argv[])
   }
   const std::string encoding(argv[1]);
 #ifdef _WIN32
-  if (encoding == "UTF8") {
+  if ((encoding == "UTF8") || (encoding == "UTF-8")) {
     setEncoding(consoleOut, CP_UTF8);
   } else if (encoding == "ANSI") {
     setEncoding(consoleOut, CP_ACP);
diff --git a/Tests/RunCMake/execute_process/EncodingUTF-8-stderr.txt b/Tests/RunCMake/execute_process/EncodingUTF-8-stderr.txt
new file mode 100644
index 0000000..0ac68de
--- /dev/null
+++ b/Tests/RunCMake/execute_process/EncodingUTF-8-stderr.txt
@@ -0,0 +1 @@
+यूनिकोड είναι very здорово!
diff --git a/Tests/RunCMake/execute_process/RunCMakeTest.cmake b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
index 83589bb..cb40b40 100644
--- a/Tests/RunCMake/execute_process/RunCMakeTest.cmake
+++ b/Tests/RunCMake/execute_process/RunCMakeTest.cmake
@@ -10,6 +10,7 @@ run_cmake_command(MergeOutputVars ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/Mer
 run_cmake(EncodingMissing)
 if(TEST_ENCODING_EXE)
   run_cmake_command(EncodingUTF8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake)
+  run_cmake_command(EncodingUTF-8 ${CMAKE_COMMAND} -DTEST_ENCODING=UTF-8 -DTEST_ENCODING_EXE=${TEST_ENCODING_EXE} -P ${RunCMake_SOURCE_DIR}/Encoding.cmake)
 endif()
 
 if(EXIT_CODE_EXE)

-----------------------------------------------------------------------

Summary of changes:
 Help/command/execute_process.rst                                 |    6 ++++--
 Source/cmProcessOutput.cxx                                       |    2 +-
 Tests/CMakeLib/testEncoding.cxx                                  |    2 +-
 .../{EncodingUTF8-stderr.txt => EncodingUTF-8-stderr.txt}        |    0
 Tests/RunCMake/execute_process/RunCMakeTest.cmake                |    1 +
 5 files changed, 7 insertions(+), 4 deletions(-)
 copy Tests/RunCMake/execute_process/{EncodingUTF8-stderr.txt => EncodingUTF-8-stderr.txt} (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list