cmake_minimum_required(VERSION 3.25.1)
find_library(CMOCKA cmocka REQUIRED)
+find_program(CPPCHECK cppcheck REQUIRED)
add_executable(rename_tests
rename_tests.c
add_custom_target(run_tests
ALL ./rename_tests
- DEPENDS rename_tests)
\ No newline at end of file
+ DEPENDS rename_tests)
+
+add_custom_command(TARGET run_tests
+ POST_BUILD
+ COMMAND ${CPPCHECK}
+ --check-level=exhaustive
+ --enable=warning,style
+ ${CMAKE_SOURCE_DIR}/src
+ ${CMAKE_SOURCE_DIR}/tests)
\ No newline at end of file