summaryrefslogtreecommitdiffstats
path: root/Help/dev/source.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Help/dev/source.rst')
-rw-r--r--Help/dev/source.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/Help/dev/source.rst b/Help/dev/source.rst
index dfde290..f70e477 100644
--- a/Help/dev/source.rst
+++ b/Help/dev/source.rst
@@ -5,3 +5,17 @@ The following is a guide to the CMake source code for developers.
See documentation on `CMake Development`_ for more information.
.. _`CMake Development`: README.rst
+
+C++ Code Style
+==============
+
+We use `clang-format`_ version **3.8** to define our style for C++ code in
+the CMake source tree. See the `.clang-format`_ configuration file for our
+style settings. Use the `Utilities/Scripts/clang-format.bash`_ script to
+format source code. It automatically runs ``clang-format`` on the set of
+source files for which we enforce style. The script also has options to
+format only a subset of files, such as those that are locally modified.
+
+.. _`clang-format`: http://clang.llvm.org/docs/ClangFormat.html
+.. _`.clang-format`: ../../.clang-format
+.. _`Utilities/Scripts/clang-format.bash`: ../../Utilities/Scripts/clang-format.bash