Skip to content

Commit 1e90d78

Browse files
committed
Configure clang-format for CMake source tree
After discussion among developers we settled on the Mozilla style with a few tweaks: * Do not align operator arguments. * Do not always break after a function return type. * Limit to 79 columns instead of 80 to fit edge cases better in 80-column terminals as CMake has always done. * Format for C++98 instead of C++11 because CMake is written in the former language. Co-Author: Daniel Pfeifer <[email protected]>
1 parent da60adc commit 1e90d78

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.clang-format

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
# This configuration requires clang-format 3.8 or higher.
3+
BasedOnStyle: Mozilla
4+
AlignOperands: false
5+
AlwaysBreakAfterReturnType: None
6+
AlwaysBreakAfterDefinitionReturnType: None
7+
ColumnLimit: 79
8+
Standard: Cpp03
9+
...

0 commit comments

Comments
 (0)