We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2fb47e4 commit 1124f46Copy full SHA for 1124f46
1 file changed
src/StaticAnalyzers.cmake
@@ -55,7 +55,21 @@ endmacro()
55
56
# Enable static analysis with clang-tidy
57
macro(enable_clang_tidy)
58
- find_program(CLANGTIDY clang-tidy)
+ # https://github.com/ejfitzgerald/clang-tidy-cache
59
+ find_program(
60
+ CLANGTIDY_CACHE
61
+ NAMES "clang-tidy-cache"
62
+ "clang-tidy-cache-windows-amd64"
63
+ "clang-tidy-cache-linux-amd64"
64
+ "clang-tidy-cache-darwin-amd64")
65
+ if(CLANGTIDY_CACHE)
66
+ # use clang-tidy-cache if found
67
+ set($ENV{CLANG_TIDY_CACHE_BINARY} ${CLANGTIDY_CACHE})
68
+ set(CLANGTIDY ${CLANGTIDY_CACHE})
69
+ else()
70
+ # otherwise use clang-tidy directly
71
+ find_program(CLANGTIDY clang-tidy)
72
+ endif()
73
if(CLANGTIDY)
74
75
# clang-tidy only works with clang when PCH is enabled
0 commit comments