Просмотр исходного кода

Merge topic 'update-kwsys'

ea2a91a4 Merge branch 'upstream-KWSys' into update-kwsys
fda80fde KWSys 2017-03-24 (7e9f7b7b)
64490637 update-kwsys: Disable custom gitattributes during import
f1a55839 update-third-party: Add helper to disable custom gitattributes

Acked-by: Kitware Robot <[email protected]>
Merge-request: !624
Brad King 8 лет назад
Родитель
Сommit
0ff8f127fb

+ 11 - 8
Source/kwsys/.gitattributes

@@ -1,12 +1,15 @@
 .git*            export-ignore
 
-*.c              whitespace=tab-in-indent,no-lf-at-eof
-*.h              whitespace=tab-in-indent,no-lf-at-eof
-*.h.in           whitespace=tab-in-indent,no-lf-at-eof
-*.cxx            whitespace=tab-in-indent,no-lf-at-eof
-*.hxx            whitespace=tab-in-indent,no-lf-at-eof
-*.hxx.in         whitespace=tab-in-indent,no-lf-at-eof
-*.txt            whitespace=tab-in-indent,no-lf-at-eof
-*.cmake          whitespace=tab-in-indent,no-lf-at-eof
+*.c              our-c-style
+*.c.in           our-c-style
+*.cxx            our-c-style
+*.h              our-c-style
+*.h.in           our-c-style
+*.hxx            our-c-style
+*.hxx.in         our-c-style
 
+*.cmake          whitespace=tab-in-indent
 *.rst            whitespace=tab-in-indent conflict-marker-size=79
+*.txt            whitespace=tab-in-indent
+
+* -format.clang-format

+ 1 - 2
Source/kwsys/ConsoleBuf.hxx.in

@@ -25,8 +25,7 @@ namespace @KWSYS_NAMESPACE@ {
 #if defined(_WIN32)
 
 template <class CharT, class Traits = std::char_traits<CharT> >
-class @KWSYS_NAMESPACE@_EXPORT BasicConsoleBuf
-  : public std::basic_streambuf<CharT, Traits>
+class BasicConsoleBuf : public std::basic_streambuf<CharT, Traits>
 {
 public:
   typedef typename Traits::int_type int_type;

+ 1 - 1
Source/kwsys/Encoding.hxx.in

@@ -13,7 +13,7 @@ class @KWSYS_NAMESPACE@_EXPORT Encoding
 {
 public:
   // Container class for argc/argv.
-  class CommandLineArguments
+  class @KWSYS_NAMESPACE@_EXPORT CommandLineArguments
   {
   public:
     // On Windows, get the program command line arguments

+ 1 - 1
Source/kwsys/FStream.hxx.in

@@ -269,7 +269,7 @@ enum BOM
 // If a BOM exists, the stream is advanced to after the BOM.
 // This function requires a seekable stream (but not a relative
 // seekable stream).
-BOM ReadBOM(std::istream& in);
+@KWSYS_NAMESPACE@_EXPORT BOM ReadBOM(std::istream& in);
 }
 }
 

+ 1 - 0
Utilities/Scripts/update-kwsys.bash

@@ -15,6 +15,7 @@ readonly paths="
 
 extract_source () {
     git_archive
+    disable_custom_gitattributes
 }
 
 export HOOKS_ALLOW_KWSYS=1

+ 8 - 0
Utilities/Scripts/update-third-party.bash

@@ -52,6 +52,14 @@ git_archive () {
         tar -C "$extractdir" -x
 }
 
+disable_custom_gitattributes() {
+    pushd "${extractdir}/${name}-reduced"
+    # Git does not allow custom attributes in a subdirectory where we
+    # are about to merge the `.gitattributes` file, so disable them.
+    sed -i '/^\[attr\]/ {s/^/#/}' .gitattributes
+    popd
+}
+
 die () {
     echo >&2 "$@"
     exit 1