summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-24 13:55:01 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-24 13:55:59 (GMT)
commitae09bc774be73def29e9878e28db9fa4cff53204 (patch)
tree9f8bf6cc2db5bf3c52cf42ba1cb2a802c90e91f4 /Help
parent3db40923295a6430eb957a3cf6826bbb18a78527 (diff)
downloadCMake-ae09bc774be73def29e9878e28db9fa4cff53204.zip
CMake-ae09bc774be73def29e9878e28db9fa4cff53204.tar.gz
CMake-ae09bc774be73def29e9878e28db9fa4cff53204.tar.bz2
Help: Add example to CMAKE_<LANG>_CLANG_TIDY
Fixes: #16869
Diffstat (limited to 'Help')
-rw-r--r--Help/variable/CMAKE_LANG_CLANG_TIDY.rst11
1 files changed, 9 insertions, 2 deletions
diff --git a/Help/variable/CMAKE_LANG_CLANG_TIDY.rst b/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
index 492c12c..d1fccbb 100644
--- a/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
+++ b/Help/variable/CMAKE_LANG_CLANG_TIDY.rst
@@ -1,6 +1,13 @@
CMAKE_<LANG>_CLANG_TIDY
-----------------------
-Default value for :prop_tgt:`<LANG>_CLANG_TIDY` target property.
+Default value for :prop_tgt:`<LANG>_CLANG_TIDY` target property
+when ``<LANG>`` is ``C`` or ``CXX``.
+
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``.
+created. For example:
+
+.. code-block:: cmake
+
+ set(CMAKE_CXX_CLANG_TIDY clang-tidy checks=-*,readability-*)
+ add_executable(foo foo.cxx)