Skip to content

Commit

Permalink
perf: add cppcheck include search built-in path (#101)
Browse files Browse the repository at this point in the history
Signed-off-by: msclock <msclock@qq.com>
  • Loading branch information
msclock authored Apr 14, 2024
1 parent f71cff9 commit cc1b755
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmake/build/Cppcheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit cc1b755

Please sign in to comment.