summaryrefslogtreecommitdiff
path: root/Help
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-04-08 22:09:27 +0200
committerBrad King <brad.king@kitware.com>2016-04-13 09:56:10 -0400
commit5e62444cff5ead280a111c116a3fe810181379cf (patch)
tree83764d54d99f246c011defdd49e0ccfa658f8fd6 /Help
parent9ac11bc25d6b9f5e7db786034f922d96613e6143 (diff)
downloadcmake-5e62444cff5ead280a111c116a3fe810181379cf.tar.gz
Add options to run clang-tidy with the compiler
Create a <LANG>_CLANG_TIDY target property (initialized by a CMAKE_<LANG>_CLANG_TIDY variable) to specify a clang-tidy command line to be run along with the compiler.
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/manual/cmake-variables.7.rst1
-rw-r--r--Help/prop_tgt/LANG_CLANG_TIDY.rst13
-rw-r--r--Help/release/dev/clang-tidy.rst7
-rw-r--r--Help/variable/CMAKE_LANG_CLANG_TIDY.rst6
5 files changed, 28 insertions, 0 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 73d1142b07..3403dcd86e 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -197,6 +197,7 @@ Properties on Targets
/prop_tgt/JOB_POOL_COMPILE
/prop_tgt/JOB_POOL_LINK
/prop_tgt/LABELS
+ /prop_tgt/LANG_CLANG_TIDY
/prop_tgt/LANG_COMPILER_LAUNCHER
/prop_tgt/LANG_INCLUDE_WHAT_YOU_USE
/prop_tgt/LANG_VISIBILITY_PRESET
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 3f73b32a1f..7cf3a3d609 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -259,6 +259,7 @@ Variables that Control the Build
/variable/CMAKE_INSTALL_RPATH
/variable/CMAKE_INSTALL_RPATH_USE_LINK_PATH
/variable/CMAKE_IOS_INSTALL_COMBINED
+ /variable/CMAKE_LANG_CLANG_TIDY
/variable/CMAKE_LANG_COMPILER_LAUNCHER
/variable/CMAKE_LANG_INCLUDE_WHAT_YOU_USE
/variable/CMAKE_LANG_VISIBILITY_PRESET
diff --git a/Help/prop_tgt/LANG_CLANG_TIDY.rst b/Help/prop_tgt/LANG_CLANG_TIDY.rst
new file mode 100644
index 0000000000..2887e235d1
--- /dev/null
+++ b/Help/prop_tgt/LANG_CLANG_TIDY.rst
@@ -0,0 +1,13 @@
+<LANG>_CLANG_TIDY
+-----------------
+
+This property is implemented only when ``<LANG>`` is ``C`` or ``CXX``.
+
+Specify a :ref:`;-list <CMake Language Lists>` containing a command
+line for the ``clang-tidy`` tool. The :ref:`Makefile Generators`
+and the :generator:`Ninja` generator will run this tool along with the
+compiler and report a warning if the tool reports any problems.
+
+This property is initialized by the value of
+the :variable:`CMAKE_<LANG>_CLANG_TIDY` variable if it is set
+when a target is created.
diff --git a/Help/release/dev/clang-tidy.rst b/Help/release/dev/clang-tidy.rst
new file mode 100644
index 0000000000..030a7c954b
--- /dev/null
+++ b/Help/release/dev/clang-tidy.rst
@@ -0,0 +1,7 @@
+clang-tidy
+----------
+
+* A :prop_tgt:`<LANG>_CLANG_TIDY` target property and supporting
+ :variable:`CMAKE_<LANG>_CLANG_TIDY` variable were introduced to tell the
+ :ref:`Makefile Generators` and the :generator:`Ninja` generator to run
+ ``clang-tidy`` along with the compiler for ``C`` and ``CXX`` languages.
diff --git a/Help/variable/CMAKE_LANG_CLANG_TIDY.rst b/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
new file mode 100644
index 0000000000..492c12c6db
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
@@ -0,0 +1,6 @@
+CMAKE_<LANG>_CLANG_TIDY
+-----------------------
+
+Default value for :prop_tgt:`<LANG>_CLANG_TIDY` target property.
+This variable is used to initialize the property on each target as it is
+created. This is done only when ``<LANG>`` is ``C`` or ``CXX``.