Jelajahi Sumber

clang-format.bash: Format CUDA source files too

Add `.clang-format` configuration files for Cuda test directories that
use `Standard: Cpp11`.  Otherwise clang-format splits the triple angle
brackets used for CUDA kernels.
Brad King 8 tahun lalu
induk
melakukan
592e3d2f96

+ 9 - 0
Tests/Cuda/.clang-format

@@ -0,0 +1,9 @@
+---
+# This configuration requires clang-format 3.8 or higher.
+BasedOnStyle: Mozilla
+AlignOperands: false
+AlwaysBreakAfterReturnType: None
+AlwaysBreakAfterDefinitionReturnType: None
+ColumnLimit: 79
+Standard: Cpp11
+...

+ 9 - 0
Tests/CudaOnly/.clang-format

@@ -0,0 +1,9 @@
+---
+# This configuration requires clang-format 3.8 or higher.
+BasedOnStyle: Mozilla
+AlignOperands: false
+AlwaysBreakAfterReturnType: None
+AlwaysBreakAfterDefinitionReturnType: None
+ColumnLimit: 79
+Standard: Cpp11
+...

+ 1 - 1
Utilities/Scripts/clang-format.bash

@@ -107,7 +107,7 @@ case "$mode" in
 esac
 
 # Filter sources to which our style should apply.
-$git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' |
+$git_ls -z -- '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' '*.cu' '*.notcu' |
 
   # Exclude lexer/parser generator input and output.
   egrep -z -v '^Source/cmCommandArgumentLexer\.' |