diff options
author | Brad King <brad.king@kitware.com> | 2017-04-19 20:19:55 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-04-19 20:33:06 (GMT) |
commit | 0fd255adf52592e6443c15a68c09cfa7fc26e85b (patch) | |
tree | 8ed099d562f6b87ee224d1a4c74abd15c6bebd44 /Help/dev/source.rst | |
parent | 540b4cdc2bd7cb824c6cf7403857844b4fce4d6e (diff) | |
download | CMake-0fd255adf52592e6443c15a68c09cfa7fc26e85b.zip CMake-0fd255adf52592e6443c15a68c09cfa7fc26e85b.tar.gz CMake-0fd255adf52592e6443c15a68c09cfa7fc26e85b.tar.bz2 |
Help/dev: Adopt clang-format instructions in coding guide
Simplify the `CONTRIBUTING.rst` document by moving the code style
section over to our dedicated coding guide and linking to it instead.
Diffstat (limited to 'Help/dev/source.rst')
-rw-r--r-- | Help/dev/source.rst | 14 |
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 |