1 set(LLVM_LINK_COMPONENTS
7 ${CMAKE_CURRENT_SOURCE_DIR}/clang-tidy-config.h.cmake
8 ${CMAKE_CURRENT_BINARY_DIR}/clang-tidy-config.h)
9 include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR})
11 add_clang_library(clangTidy STATIC
15 ClangTidyDiagnosticConsumer.cpp
17 ClangTidyProfiling.cpp
18 ExpandModularHeadersPPCallbacks.cpp
20 NoLintDirectiveHandler.cpp
28 clang_target_link_libraries(clangTidy
43 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
44 clang_target_link_libraries(clangTidy
46 clangStaticAnalyzerCore
47 clangStaticAnalyzerFrontend
52 # If you add a check, also add it to ClangTidyForceLinker.h in this directory.
53 add_subdirectory(android)
54 add_subdirectory(abseil)
55 add_subdirectory(altera)
56 add_subdirectory(boost)
57 add_subdirectory(bugprone)
58 add_subdirectory(cert)
59 add_subdirectory(concurrency)
60 add_subdirectory(cppcoreguidelines)
61 add_subdirectory(darwin)
62 add_subdirectory(fuchsia)
63 add_subdirectory(google)
64 add_subdirectory(hicpp)
65 add_subdirectory(linuxkernel)
66 add_subdirectory(llvm)
67 add_subdirectory(llvmlibc)
68 add_subdirectory(misc)
69 add_subdirectory(modernize)
70 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
73 add_subdirectory(objc)
74 add_subdirectory(openmp)
75 add_subdirectory(performance)
76 add_subdirectory(portability)
77 add_subdirectory(readability)
78 add_subdirectory(zircon)
79 set(ALL_CLANG_TIDY_CHECKS
80 clangTidyAndroidModule
84 clangTidyBugproneModule
86 clangTidyConcurrencyModule
87 clangTidyCppCoreGuidelinesModule
89 clangTidyFuchsiaModule
92 clangTidyLinuxKernelModule
94 clangTidyLLVMLibcModule
96 clangTidyModernizeModule
99 clangTidyPerformanceModule
100 clangTidyPortabilityModule
101 clangTidyReadabilityModule
102 clangTidyZirconModule
104 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
105 list(APPEND ALL_CLANG_TIDY_CHECKS clangTidyMPIModule)
107 set(ALL_CLANG_TIDY_CHECKS ${ALL_CLANG_TIDY_CHECKS} PARENT_SCOPE)
109 # Other subtargets. These may reference ALL_CLANG_TIDY_CHECKS
110 # and must be below its definition.
111 add_subdirectory(plugin)
112 add_subdirectory(tool)
113 add_subdirectory(utils)
115 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
117 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/clang-tidy"
118 COMPONENT clang-tidy-headers
122 add_custom_target(clang-tidy-headers)
123 set_target_properties(clang-tidy-headers PROPERTIES FOLDER "Clang Tools Extra/Resources")
124 if(NOT LLVM_ENABLE_IDE)
125 add_llvm_install_targets(install-clang-tidy-headers
126 DEPENDS clang-tidy-headers
127 COMPONENT clang-tidy-headers)