[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible
[lldb.git] / clang-tools-extra / clang-tidy / tool / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   AllTargetsAsmParsers
3   AllTargetsDescs
4   AllTargetsInfos
5   support
6   )
7
8 add_clang_tool(clang-tidy
9   ClangTidyMain.cpp
10   )
11 add_dependencies(clang-tidy
12   clang-resource-headers
13   )
14 clang_target_link_libraries(clang-tidy
15   PRIVATE
16   clangAST
17   clangASTMatchers
18   clangBasic
19   clangTooling
20   clangToolingCore
21   )
22 target_link_libraries(clang-tidy
23   PRIVATE
24   clangTidy
25   ${ALL_CLANG_TIDY_CHECKS}
26   )
27
28
29 install(PROGRAMS clang-tidy-diff.py
30   DESTINATION share/clang
31   COMPONENT clang-tidy)
32 install(PROGRAMS run-clang-tidy.py
33   DESTINATION share/clang
34   COMPONENT clang-tidy)