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  383f94597d77fc1549e88e16e7a5ddb9b752b398 (commit)
       via  121b8702308ba28058c4894af0d593fe85ffee52 (commit)
      from  b8c8c62880718c4bfbae5ea53b6a7723a264d6bb (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=383f94597d77fc1549e88e16e7a5ddb9b752b398
commit 383f94597d77fc1549e88e16e7a5ddb9b752b398
Merge: b8c8c62 121b870
Author:     Clinton Stimpson <clin...@elemtech.com>
AuthorDate: Mon Mar 10 23:01:38 2014 -0400
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Mon Mar 10 23:01:38 2014 -0400

    Merge topic 'configure_file-unicode' into next
    
    121b8702 Unicode: check encoding of files given to configure_file.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=121b8702308ba28058c4894af0d593fe85ffee52
commit 121b8702308ba28058c4894af0d593fe85ffee52
Author:     Clinton Stimpson <clin...@elemtech.com>
AuthorDate: Thu Mar 6 22:55:07 2014 -0700
Commit:     Clinton Stimpson <clin...@elemtech.com>
CommitDate: Mon Mar 10 20:59:59 2014 -0600

    Unicode: check encoding of files given to configure_file.
    
    UTF-16 and UTF-32 files are rejected.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 92177c8..ebf83bd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3518,6 +3518,19 @@ int cmMakefile::ConfigureFile(const char* infile, const 
char* outfile,
       return 0;
       }
 
+    cmsys::FStream::BOM bom = cmsys::FStream::ReadBOM(fin);
+    if(bom != cmsys::FStream::BOM_None &&
+       bom != cmsys::FStream::BOM_UTF8)
+      {
+      cmSystemTools::Error("File starts with a Byte-Order-Mark "
+                           "that is not UTF-8 ",
+                           sinfile.c_str());
+      return 0;
+      }
+    // rewind to copy BOM to output file
+    fin.seekg(0);
+
+
     // now copy input to output and expand variables in the
     // input file at the same time
     std::string inLine;

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

Summary of changes:
 Source/cmMakefile.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to