[clang-tools-extra] [cmake] Link against libclang-cpp whenever possible
[lldb.git] / clang-tools-extra / unittests / clang-include-fixer / CMakeLists.txt
1 set(LLVM_LINK_COMPONENTS
2   support
3   )
4
5 get_filename_component(INCLUDE_FIXER_SOURCE_DIR
6   ${CMAKE_CURRENT_SOURCE_DIR}/../../clang-include-fixer REALPATH)
7 include_directories(
8   ${INCLUDE_FIXER_SOURCE_DIR}
9   )
10
11 # We'd like to clang/unittests/Tooling/RewriterTestContext.h in the test.
12 include_directories(${CLANG_SOURCE_DIR})
13
14 add_extra_unittest(ClangIncludeFixerTests
15   IncludeFixerTest.cpp
16   FuzzySymbolIndexTests.cpp
17   )
18
19 clang_target_link_libraries(ClangIncludeFixerTests
20   PRIVATE
21   clangBasic
22   clangFormat
23   clangFrontend
24   clangRewrite
25   clangSerialization
26   clangTooling
27   clangToolingCore
28   )
29 target_link_libraries(ClangIncludeFixerTests
30   PRIVATE
31   clangIncludeFixer
32   findAllSymbols
33   )
34
35 add_subdirectory(find-all-symbols)