LANG_CPPCHECK.rst 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. <LANG>_CPPCHECK
  2. ---------------
  3. .. versionadded:: 3.10
  4. This property is supported only when ``<LANG>`` is ``C`` or ``CXX``.
  5. Specify a :ref:`semicolon-separated list <CMake Language Lists>` containing a command line
  6. for the ``cppcheck`` static analysis tool. The :ref:`Makefile Generators`
  7. and the :generator:`Ninja` generator will run ``cppcheck`` along with the
  8. compiler and report any problems. If the command-line specifies the
  9. exit code options to ``cppcheck`` then the build will fail if the
  10. tool returns non-zero.
  11. This property is initialized by the value of the
  12. :variable:`CMAKE_<LANG>_CPPCHECK` variable if it is set when a target is
  13. created.
  14. .. versionadded:: 3.27
  15. This property supports
  16. :manual:`generator expressions <cmake-generator-expressions(7)>`.
  17. .. versionadded:: 3.27
  18. :prop_sf:`SKIP_LINTING` can be set on individual source files to exclude
  19. them from the linting tools defined by :prop_tgt:`<LANG>_CPPLINT`,
  20. :prop_tgt:`<LANG>_CLANG_TIDY`, ``<LANG>_CPPCHECK``, and
  21. :prop_tgt:`<LANG>_INCLUDE_WHAT_YOU_USE`. When :prop_sf:`SKIP_LINTING` is
  22. set to true on a source file, those tools will not be run on that specific
  23. file.