set(LLVM_LINK_COMPONENTS
  support
  )

get_filename_component(CLANGD_SOURCE_DIR
  ${CMAKE_CURRENT_SOURCE_DIR}/../../clangd REALPATH)
include_directories(
  ${CLANGD_SOURCE_DIR}
  )

add_extra_unittest(ClangdTests
  Annotations.cpp
  ClangdTests.cpp
  ClangdUnitTests.cpp
  CodeCompleteTests.cpp
  CodeCompletionStringsTests.cpp
  ContextTests.cpp
  DraftStoreTests.cpp
  FileIndexTests.cpp
  FindSymbolsTests.cpp
  FuzzyMatchTests.cpp
  GlobalCompilationDatabaseTests.cpp
  HeadersTests.cpp
  IndexTests.cpp
  JSONExprTests.cpp
  QualityTests.cpp
  SourceCodeTests.cpp
  SymbolCollectorTests.cpp
  SyncAPI.cpp
  TestFS.cpp
  TestTU.cpp
  ThreadingTests.cpp
  TraceTests.cpp
  TUSchedulerTests.cpp
  URITests.cpp
  XRefsTests.cpp
  )

target_link_libraries(ClangdTests
  PRIVATE
  clangBasic
  clangDaemon
  clangFormat
  clangFrontend
  clangIndex
  clangLex
  clangSema
  clangTooling
  clangToolingCore
  LLVMSupport
  LLVMTestingSupport
  )

set(LLVM_LINK_COMPONENTS
  support
  )

get_filename_component(CLANGD_SOURCE_DIR
  ${CMAKE_CURRENT_SOURCE_DIR}/../../clangd REALPATH)
include_directories(
  ${CLANGD_SOURCE_DIR}
  )

add_extra_unittest(ClangdTests
  Annotations.cpp
  ClangdTests.cpp
  ClangdUnitTests.cpp
  CodeCompleteTests.cpp
  CodeCompletionStringsTests.cpp
  ContextTests.cpp
  DraftStoreTests.cpp
  FileIndexTests.cpp
  FindSymbolsTests.cpp
  FuzzyMatchTests.cpp
  GlobalCompilationDatabaseTests.cpp
  HeadersTests.cpp
  IndexTests.cpp
  JSONExprTests.cpp
  QualityTests.cpp
  SourceCodeTests.cpp
  SymbolCollectorTests.cpp
  SyncAPI.cpp
  TestFS.cpp
  TestTU.cpp
  ThreadingTests.cpp
  TraceTests.cpp
  TUSchedulerTests.cpp
  URITests.cpp
  XRefsTests.cpp
  )

target_link_libraries(ClangdTests
  PRIVATE
  clangAST
  clangBasic
  clangDaemon
  clangFormat
  clangFrontend
  clangIndex
  clangLex
  clangSema
  clangTooling
  clangToolingCore
  LLVMSupport
  LLVMTestingSupport
  )

Fix a link failure in unittests
[clangd] Fix a link failure in unittests

Summary: D46524 (rL332378) introduced a link failure when built with
`-DSHARED_LIB=ON`, which this patch fixes.

Reviewers: ioeric

Subscribers: klimek, mgorny, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits

Differential Revision: https://reviews.llvm.org/D46906

git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@332438 91177308-0d34-0410-b5e6-96231b3b80d8
