diff options
Diffstat (limited to 'clangd/test/CMakeLists.txt')
-rw-r--r-- | clangd/test/CMakeLists.txt | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clangd/test/CMakeLists.txt b/clangd/test/CMakeLists.txt index 139300f1..bbb582f1 100644 --- a/clangd/test/CMakeLists.txt +++ b/clangd/test/CMakeLists.txt @@ -1,3 +1,13 @@ +# Set CLANG_TOOLS_DIR to buildtree/bin, or buildtree/%(build_mode)s/bin if the +# location is dynamic. The latter must be interpolated by lit configs. +# FIXME: this is duplicated in many places. +if (CMAKE_CFG_INTDIR STREQUAL ".") + set(LLVM_BUILD_MODE ".") +else () + set(LLVM_BUILD_MODE "%(build_mode)s") +endif () +string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) + set(CLANGD_TEST_DEPS clangd ClangdTests @@ -18,8 +28,8 @@ foreach(dep FileCheck count not) endforeach() configure_lit_site_cfg( - ${CMAKE_CURRENT_SOURCE_DIR}/lit.cfg.in - ${CMAKE_CURRENT_BINARY_DIR}/lit.cfg) + ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in + ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py) add_lit_testsuite(check-clangd "Running the Clangd regression tests" ${CMAKE_CURRENT_BINARY_DIR}/../unittests;${CMAKE_CURRENT_BINARY_DIR} |