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
15 ClangTidyDiagnosticConsumer.cpp
17 ClangTidyProfiling.cpp
18 ExpandModularHeadersPPCallbacks.cpp
20 NoLintDirectiveHandler.cpp
28 clang_target_link_libraries(clangTidy
44 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
45 clang_target_link_libraries(clangTidy
47 clangStaticAnalyzerCore
48 clangStaticAnalyzerFrontend
53 # If you add a check, also add it to ClangTidyForceLinker.h in this directory.
54 add_subdirectory(android)
55 add_subdirectory(abseil)
56 add_subdirectory(altera)
57 add_subdirectory(boost)
58 add_subdirectory(bugprone)
59 add_subdirectory(cert)
60 add_subdirectory(concurrency)
61 add_subdirectory(cppcoreguidelines)
62 add_subdirectory(darwin)
63 add_subdirectory(fuchsia)
64 add_subdirectory(google)
65 add_subdirectory(hicpp)
66 add_subdirectory(linuxkernel)
67 add_subdirectory(llvm)
68 add_subdirectory(llvmlibc)
69 add_subdirectory(misc)
70 add_subdirectory(modernize)
71 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
74 add_subdirectory(objc)
75 add_subdirectory(openmp)
76 add_subdirectory(performance)
77 add_subdirectory(portability)
78 add_subdirectory(readability)
79 add_subdirectory(zircon)
80 set(ALL_CLANG_TIDY_CHECKS
81 clangTidyAndroidModule
85 clangTidyBugproneModule
87 clangTidyConcurrencyModule
88 clangTidyCppCoreGuidelinesModule
90 clangTidyFuchsiaModule
93 clangTidyLinuxKernelModule
95 clangTidyLLVMLibcModule
97 clangTidyModernizeModule
100 clangTidyPerformanceModule
101 clangTidyPortabilityModule
102 clangTidyReadabilityModule
103 clangTidyZirconModule
105 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
106 list(APPEND ALL_CLANG_TIDY_CHECKS clangTidyMPIModule)
108 set(ALL_CLANG_TIDY_CHECKS ${ALL_CLANG_TIDY_CHECKS} PARENT_SCOPE)
110 # Other subtargets. These may reference ALL_CLANG_TIDY_CHECKS
111 # and must be below its definition.
112 add_subdirectory(plugin)
113 add_subdirectory(tool)
114 add_subdirectory(utils)
116 if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
118 DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/clang-tidy"
119 COMPONENT clang-tidy-headers
123 add_custom_target(clang-tidy-headers)
124 set_target_properties(clang-tidy-headers PROPERTIES FOLDER "Misc")
125 if(NOT LLVM_ENABLE_IDE)
126 add_llvm_install_targets(install-clang-tidy-headers
127 DEPENDS clang-tidy-headers
128 COMPONENT clang-tidy-headers)