1 find_program(CPPCHECK_PATH cppcheck)
3 message(STATUS "cppcheck: ${CPPCHECK_PATH}")
4 add_custom_target(cppcheck
5 COMMAND ${CPPCHECK_PATH}
6 --suppressions-list=${CMAKE_CURRENT_SOURCE_DIR}/src/cppcheck-suppress.txt
12 --template='{file}:{line},{severity},{id},{message}'
13 -I ${CMAKE_CURRENT_SOURCE_DIR}/src
14 -I ${CMAKE_CURRENT_SOURCE_DIR}/include
15 ${CMAKE_CURRENT_SOURCE_DIR}/src
16 ${CMAKE_CURRENT_SOURCE_DIR}/include
17 2> ${CMAKE_CURRENT_BINARY_DIR}/doc/cppcheck.txt
18 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
21 message(STATUS "cppcheck: not found, target not available.")