[clang-tools-extra] Fix linking ClangdTests when using libclang-cpp
authorMichał Górny <mgorny@gentoo.org>
Mon, 20 Mar 2023 15:00:10 +0000 (16:00 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 24 Mar 2023 19:25:31 +0000 (20:25 +0100)
commit3bff90e7e84aad6f0fddaf1d17a7db011052b95d
treee0fc85ce17424126733c60d92df622bd6c0c7b78
parent0f6fd1b704c014089f94271e08417a8179ee2b1c
[clang-tools-extra] Fix linking ClangdTests when using libclang-cpp

Fix linking ClangdTests to specify the dependency on the private
clangTesting library via target_link_libraries() rather than
clang_target_link_libraries().  The latter uses libclang-cpp when
CLANG_LINK_CLANG_DYLIB is used, and clangTesting is not included
in this library.

This fixes d60d3455eb2b375d026a4aa74c4ba0c38f5d323c.

Differential Revision: https://reviews.llvm.org/D146427
clang-tools-extra/clangd/unittests/CMakeLists.txt