[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible
[lldb.git] / clang-tools-extra / unittests / clang-tidy / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   support
3   )
4
5 get_filename_component(CLANG_LINT_SOURCE_DIR
6   ${CMAKE_CURRENT_SOURCE_DIR}/../../clang-tidy REALPATH)
7 include_directories(${CLANG_LINT_SOURCE_DIR})
8
9 add_extra_unittest(ClangTidyTests
10   ClangTidyDiagnosticConsumerTest.cpp
11   ClangTidyOptionsTest.cpp
12   IncludeInserterTest.cpp
13   GlobListTest.cpp
14   GoogleModuleTest.cpp
15   LLVMModuleTest.cpp
16   NamespaceAliaserTest.cpp
17   ObjCModuleTest.cpp
18   OverlappingReplacementsTest.cpp
19   UsingInserterTest.cpp
20   ReadabilityModuleTest.cpp
21   TransformerClangTidyCheckTest.cpp
22   )
23
24 clang_target_link_libraries(ClangTidyTests
25   PRIVATE
26   clangAST
27   clangASTMatchers
28   clangBasic
29   clangFrontend
30   clangLex
31   clangSerialization
32   clangTooling
33   clangToolingCore
34   clangToolingRefactoring
35   )
36 target_link_libraries(ClangTidyTests
37   PRIVATE
38   clangTidy
39   clangTidyAndroidModule
40   clangTidyGoogleModule
41   clangTidyLLVMModule
42   clangTidyObjCModule
43   clangTidyReadabilityModule
44   clangTidyUtils
45   )