From 73e456fa04ef647dcbfa12a677296e618f39725f Mon Sep 17 00:00:00 2001 From: msclock Date: Sun, 14 Apr 2024 21:00:46 +0800 Subject: [PATCH] perf: add cppcheck include search built-in path Signed-off-by: msclock --- cmake/build/Cppcheck.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/build/Cppcheck.cmake b/cmake/build/Cppcheck.cmake index 5beebf9..c1c43cb 100644 --- a/cmake/build/Cppcheck.cmake +++ b/cmake/build/Cppcheck.cmake @@ -66,6 +66,11 @@ else() set(CPPCHECK_TEMPLATE "gcc") endif() +if(VCPKG_INSTALLED_DIR AND VCPKG_TARGET_TRIPLET) + list(APPEND USE_CPPCHECK_OPTIONS -I + ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include) +endif() + set(CMAKE_CXX_CPPCHECK ${CPPCHECK_COMMAND} --template=${CPPCHECK_TEMPLATE} ${USE_CPPCHECK_OPTIONS} --suppress=${USE_CPPCHECK_SUPPRESS_DIR})