mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
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.
This commit is contained in:
9
Tests/Cuda/.clang-format
Normal file
9
Tests/Cuda/.clang-format
Normal file
@@ -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
Tests/CudaOnly/.clang-format
Normal file
9
Tests/CudaOnly/.clang-format
Normal file
@@ -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
|
||||
...
|
||||
@@ -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\.' |
|
||||
|
||||
Reference in New Issue
Block a user