[InstCombine] Drop range attributes in `foldBitCeil` (#116641)
[llvm-project.git] / clang-tools-extra / clang-tidy / CMakeLists.txt
blob93117cf1d6373a0d6f61400b31ebe29ffa2a6a49
1 set(LLVM_LINK_COMPONENTS
2   FrontendOpenMP
3   Support
4   )
6 configure_file(
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
12   ClangTidy.cpp
13   ClangTidyCheck.cpp
14   ClangTidyModule.cpp
15   ClangTidyDiagnosticConsumer.cpp
16   ClangTidyOptions.cpp
17   ClangTidyProfiling.cpp
18   ExpandModularHeadersPPCallbacks.cpp
19   GlobList.cpp
20   NoLintDirectiveHandler.cpp
22   DEPENDS
23   ClangSACheckers
24   omp_gen
25   ClangDriverOptions
26   )
28 clang_target_link_libraries(clangTidy
29   PRIVATE
30   clangAST
31   clangASTMatchers
32   clangAnalysis
33   clangBasic
34   clangFormat
35   clangFrontend
36   clangLex
37   clangRewrite
38   clangSerialization
39   clangTooling
40   clangToolingCore
41   )
43 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
44   clang_target_link_libraries(clangTidy
45     PRIVATE
46     clangStaticAnalyzerCore
47     clangStaticAnalyzerFrontend
48   )
49 endif()
51 # Checks.
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)
71   add_subdirectory(mpi)
72 endif()
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
81   clangTidyAbseilModule
82   clangTidyAlteraModule
83   clangTidyBoostModule
84   clangTidyBugproneModule
85   clangTidyCERTModule
86   clangTidyConcurrencyModule
87   clangTidyCppCoreGuidelinesModule
88   clangTidyDarwinModule
89   clangTidyFuchsiaModule
90   clangTidyGoogleModule
91   clangTidyHICPPModule
92   clangTidyLinuxKernelModule
93   clangTidyLLVMModule
94   clangTidyLLVMLibcModule
95   clangTidyMiscModule
96   clangTidyModernizeModule
97   clangTidyObjCModule
98   clangTidyOpenMPModule
99   clangTidyPerformanceModule
100   clangTidyPortabilityModule
101   clangTidyReadabilityModule
102   clangTidyZirconModule
103   )
104 if(CLANG_TIDY_ENABLE_STATIC_ANALYZER)
105   list(APPEND ALL_CLANG_TIDY_CHECKS clangTidyMPIModule)
106 endif()
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)
116   install(DIRECTORY .
117     DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/clang-tidy"
118     COMPONENT clang-tidy-headers
119     FILES_MATCHING
120     PATTERN "*.h"
121     )
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)
128   endif()
129 endif()