Imported Upstream version 3.25.0
[platform/upstream/cmake.git] / Help / prop_tgt / LANG_CLANG_TIDY.rst
1 <LANG>_CLANG_TIDY
2 -----------------
3
4 .. versionadded:: 3.6
5
6 This property is implemented only when ``<LANG>`` is ``C``, ``CXX``, ``OBJC``
7 or ``OBJCXX``.
8
9 Specify a :ref:`semicolon-separated list <CMake Language Lists>` containing
10 a command line for the ``clang-tidy`` tool.  The :ref:`Makefile Generators`
11 and the :generator:`Ninja` generator will run this tool along with the
12 compiler and report a warning if the tool reports any problems.
13
14 The specified ``clang-tidy`` command line will be invoked with additional
15 arguments specifying the source file and, after ``--``, the full compiler
16 command line.
17
18 .. versionchanged:: 3.25
19
20   If the specified ``clang-tidy`` command line includes the ``-p`` option,
21   it will be invoked without ``--`` and the full compiler command line.
22   ``clang-tidy`` will look up the source file in the specified compiler
23   commands database.
24
25 This property is initialized by the value of
26 the :variable:`CMAKE_<LANG>_CLANG_TIDY` variable if it is set
27 when a target is created.