X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/51998949e60e2a7e86e4393b315cfb76a58ca80d..2196a3a0cdc5384c082febb7f4aa5994cc7d80db:/projects/CMakeLists.txt diff --git a/projects/CMakeLists.txt b/projects/CMakeLists.txt index fda001c6..39e548b1 100644 --- a/projects/CMakeLists.txt +++ b/projects/CMakeLists.txt @@ -14,4 +14,22 @@ if ( BUILD_STG ) add_subdirectory ( stargazer ) endif ( BUILD_STG ) -add_custom_target (cppcheck COMMAND cppcheck --enable=all --std=c++14 ${CMAKE_SOURCE_DIR}/rscriptd ${CMAKE_SOURCE_DIR}/sgauth ${CMAKE_SOURCE_DIR}/sgconf ${CMAKE_SOURCE_DIR}/stargazer) +set ( LIB_DIRS ${CMAKE_SOURCE_DIR}/libs/common + ${CMAKE_SOURCE_DIR}/libs/conffiles + ${CMAKE_SOURCE_DIR}/libs/crypto + ${CMAKE_SOURCE_DIR}/libs/ia + ${CMAKE_SOURCE_DIR}/libs/logger + ${CMAKE_SOURCE_DIR}/libs/pinger + ${CMAKE_SOURCE_DIR}/libs/scriptexecuter + ${CMAKE_SOURCE_DIR}/libs/srvconf + ) + +if (CPPCHECK_FOREIGN) + set ( LIB_DIRS ${LIB_DIRS} + ${CMAKE_SOURCE_DIR}/libs/dotconfpp + ${CMAKE_SOURCE_DIR}/libs/ibpp + ${CMAKE_SOURCE_DIR}/libs/smux + ) +endif () + +add_custom_target (cppcheck COMMAND /usr/bin/cppcheck --enable=all --std=c++17 ${LIB_DIRS} ${CMAKE_SOURCE_DIR}/projects/rscriptd ${CMAKE_SOURCE_DIR}/projects/sgauth ${CMAKE_SOURCE_DIR}/projects/sgconf ${CMAKE_SOURCE_DIR}/projects/stargazer)