summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-11 14:30:56 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:04:46 (GMT)
commit1e90d78f99cab5dea29af87e2f2d26880a71eae4 (patch)
tree89a93100710a83b5320bf2586005ba7629144ed5
parentda60adc363b3e0e0dd5f1fee23bd0f7254be9a78 (diff)
downloadCMake-1e90d78f99cab5dea29af87e2f2d26880a71eae4.zip
CMake-1e90d78f99cab5dea29af87e2f2d26880a71eae4.tar.gz
CMake-1e90d78f99cab5dea29af87e2f2d26880a71eae4.tar.bz2
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 <daniel@pfeifer-mail.de>
-rw-r--r--.clang-format9
1 files changed, 9 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..a8bde41
--- /dev/null
+++ b/.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: Cpp03
+...