diff --git a/CMakeLists.txt b/CMakeLists.txt index fdc86e35..82d148b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -435,7 +435,7 @@ if (SQLITECPP_RUN_CPPCHECK) # add a cppcheck target to the "all" target add_custom_target(SQLiteCpp_cppcheck ALL - COMMAND ${CPPCHECK_EXECUTABLE} -j 8 cppcheck --enable=style --quiet ${CPPCHECK_ARG_TEMPLATE} ${PROJECT_SOURCE_DIR}/src + COMMAND ${CPPCHECK_EXECUTABLE} -j 8 cppcheck --enable=style --quiet ${CPPCHECK_ARG_TEMPLATE} ${PROJECT_SOURCE_DIR}/src --error-exitcode=2 ) execute_process(COMMAND "${CPPCHECK_EXECUTABLE}" --version OUTPUT_VARIABLE CPPCHECK_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) message(STATUS "Found Cppcheck: ${CPPCHECK_EXECUTABLE} (found version ${CPPCHECK_VERSION})")