We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f64c42b commit 1d5cb52Copy full SHA for 1d5cb52
src/StaticAnalyzers.cmake
@@ -27,7 +27,21 @@ macro(enable_cppcheck)
27
endmacro()
28
29
macro(enable_clang_tidy)
30
- find_program(CLANGTIDY clang-tidy)
+ # https://github.com/ejfitzgerald/clang-tidy-cache
31
+ find_program(
32
+ CLANGTIDY_CACHE
33
+ NAMES "clang-tidy-cache"
34
+ "clang-tidy-cache-windows-amd64"
35
+ "clang-tidy-cache-linux-amd64"
36
+ "clang-tidy-cache-darwin-amd64")
37
+ if(CLANGTIDY_CACHE)
38
+ # use clang-tidy-cache if found
39
+ set($ENV{CLANG_TIDY_CACHE_BINARY} ${CLANGTIDY_CACHE})
40
+ set(CLANGTIDY ${CLANGTIDY_CACHE})
41
+ else()
42
+ # otherwise use clang-tidy directly
43
+ find_program(CLANGTIDY clang-tidy)
44
+ endif()
45
if(CLANGTIDY)
46
if(NOT
47
CMAKE_CXX_COMPILER_ID
0 commit comments