Debian Codegraph @

llvm-project/clang-tools-extra/clangd/test/CMakeLists.txt

raw
1 set(CLANGD_TEST_DEPS
2 clangd
3 ClangdTests
4 clangd-indexer
5 # No tests for it, but we should still make sure they build.
6 dexp
7 )
8
9 if(CLANGD_BUILD_XPC)
10 list(APPEND CLANGD_TEST_DEPS clangd-xpc-test-client)
11 list(APPEND CLANGD_TEST_DEPS ClangdXpcUnitTests)
12 endif()
13
14 if(CLANGD_ENABLE_REMOTE)
15 list(APPEND CLANGD_TEST_DEPS clangd-index-server clangd-index-server-monitor)
16 endif()
17
18 foreach(dep FileCheck count not llvm-config)
19 if(TARGET ${dep})
20 list(APPEND CLANGD_TEST_DEPS ${dep})
21 endif()
22 endforeach()
23
24 configure_lit_site_cfg(
25 ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
26 ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
27 MAIN_CONFIG
28 ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.py
29 )
30
31 add_lit_testsuite(check-clangd "Running the Clangd regression tests"
32 # clangd doesn't put unittest configs in test/unit like every other project.
33 # Because of that, this needs to pass two folders here, while every other
34 # project only needs to pass CMAKE_CURRENT_BINARY_DIR.
35 ${CMAKE_CURRENT_BINARY_DIR}/../unittests;${CMAKE_CURRENT_BINARY_DIR}
36 DEPENDS ${CLANGD_TEST_DEPS})