[AMDGPU][AsmParser][NFC] Translate parsed MIMG instructions to MCInsts automatically.
[llvm-project.git] / clang-tools-extra / clangd / unittests / CMakeLists.txt
blob8d02b91fdd71669d9b5419543ed0758619e5b46d
1 set(LLVM_LINK_COMPONENTS
2   support
3   AllTargetsInfos
4   FrontendOpenMP
5   )
7 if(CLANG_BUILT_STANDALONE)
8   # LLVMTestingSupport and LLVMTestingAnnotations are needed for clangd tests.
9   if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations
10       AND NOT TARGET LLVMTestingAnnotations)
11     add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Annotations
12       lib/Testing/Annotations)
13   endif()
14   if (EXISTS ${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
15       AND NOT TARGET LLVMTestingSupport)
16     add_subdirectory(${LLVM_MAIN_SRC_DIR}/lib/Testing/Support
17       lib/Testing/Support)
18   endif()
19 endif()
21 if (CLANGD_ENABLE_REMOTE)
22   include_directories(${CMAKE_CURRENT_BINARY_DIR}/../index/remote)
23   add_definitions(-DGOOGLE_PROTOBUF_NO_RTTI=1)
24   set(REMOTE_TEST_SOURCES remote/MarshallingTests.cpp)
25 endif()
27 include(${CMAKE_CURRENT_SOURCE_DIR}/../quality/CompletionModel.cmake)
28 gen_decision_forest(${CMAKE_CURRENT_SOURCE_DIR}/decision_forest_model DecisionForestRuntimeTest ::ns1::ns2::test::Example)
30 add_custom_target(ClangdUnitTests)
31 add_unittest(ClangdUnitTests ClangdTests
32   Annotations.cpp
33   ASTTests.cpp
34   ASTSignalsTests.cpp
35   BackgroundIndexTests.cpp
36   CallHierarchyTests.cpp
37   CanonicalIncludesTests.cpp
38   ClangdTests.cpp
39   ClangdLSPServerTests.cpp
40   CodeCompleteTests.cpp
41   CodeCompletionStringsTests.cpp
42   CollectMacrosTests.cpp
43   CompileCommandsTests.cpp
44   CompilerTests.cpp
45   ConfigCompileTests.cpp
46   ConfigProviderTests.cpp
47   ConfigYAMLTests.cpp
48   DecisionForestTests.cpp
49   DexTests.cpp
50   DiagnosticsTests.cpp
51   DraftStoreTests.cpp
52   DumpASTTests.cpp
53   ExpectedTypeTest.cpp
54   FeatureModulesTests.cpp
55   FileDistanceTests.cpp
56   FileIndexTests.cpp
57   FindSymbolsTests.cpp
58   FindTargetTests.cpp
59   FormatTests.cpp
60   FSTests.cpp
61   FuzzyMatchTests.cpp
62   GlobalCompilationDatabaseTests.cpp
63   HeadersTests.cpp
64   HeaderSourceSwitchTests.cpp
65   HoverTests.cpp
66   IncludeCleanerTests.cpp
67   IndexActionTests.cpp
68   IndexTests.cpp
69   InlayHintTests.cpp
70   InsertionPointTests.cpp
71   JSONTransportTests.cpp
72   LoggerTests.cpp
73   LSPBinderTests.cpp
74   LSPClient.cpp
75   ModulesTests.cpp
76   ParsedASTTests.cpp
77   PathMappingTests.cpp
78   PreambleTests.cpp
79   PrintASTTests.cpp
80   ProjectAwareIndexTests.cpp
81   QualityTests.cpp
82   RIFFTests.cpp
83   RenameTests.cpp
84   ReplayPeambleTests.cpp
85   SelectionTests.cpp
86   SemanticHighlightingTests.cpp
87   SemanticSelectionTests.cpp
88   SerializationTests.cpp
89   SourceCodeTests.cpp
90   StdLibTests.cpp
91   SymbolCollectorTests.cpp
92   SymbolInfoTests.cpp
93   SyncAPI.cpp
94   TUSchedulerTests.cpp
95   TestFS.cpp
96   TestIndex.cpp
97   TestTU.cpp
98   TestWorkspace.cpp
99   ThreadCrashReporterTests.cpp
100   TidyProviderTests.cpp
101   TypeHierarchyTests.cpp
102   URITests.cpp
103   XRefsTests.cpp
104   ${CMAKE_CURRENT_BINARY_DIR}/DecisionForestRuntimeTest.cpp
106   support/CancellationTests.cpp
107   support/ContextTests.cpp
108   support/FileCacheTests.cpp
109   support/FunctionTests.cpp
110   support/MarkupTests.cpp
111   support/MemoryTreeTests.cpp
112   support/PathTests.cpp
113   support/TestTracer.cpp
114   support/ThreadingTests.cpp
115   support/TraceTests.cpp
117   tweaks/AddUsingTests.cpp
118   tweaks/AnnotateHighlightingsTests.cpp
119   tweaks/DefineInlineTests.cpp
120   tweaks/DefineOutlineTests.cpp
121   tweaks/DumpASTTests.cpp
122   tweaks/DumpRecordLayoutTests.cpp
123   tweaks/DumpSymbolTests.cpp
124   tweaks/ExpandDeducedTypeTests.cpp
125   tweaks/ExpandMacroTests.cpp
126   tweaks/ExtractFunctionTests.cpp
127   tweaks/ExtractVariableTests.cpp
128   tweaks/MemberwiseConstructorTests.cpp
129   tweaks/ObjCLocalizeStringLiteralTests.cpp
130   tweaks/ObjCMemberwiseInitializerTests.cpp
131   tweaks/PopulateSwitchTests.cpp
132   tweaks/RawStringLiteralTests.cpp
133   tweaks/RemoveUsingNamespaceTests.cpp
134   tweaks/ShowSelectionTreeTests.cpp
135   tweaks/SpecialMembersTests.cpp
136   tweaks/SwapIfBranchesTests.cpp
137   tweaks/TweakTesting.cpp
138   tweaks/TweakTests.cpp
140   ${REMOTE_TEST_SOURCES}
142   $<TARGET_OBJECTS:obj.clangDaemonTweaks>
143   )
145 # Include generated ComletionModel headers.
146 target_include_directories(ClangdTests PUBLIC
147   $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
150 clang_target_link_libraries(ClangdTests
151   PRIVATE
152   clangAST
153   clangASTMatchers
154   clangBasic
155   clangFormat
156   clangFrontend
157   clangIndex
158   clangLex
159   clangSema
160   clangSerialization
161   clangTooling
162   clangToolingCore
163   clangToolingInclusions
164   clangToolingInclusionsStdlib
165   clangToolingRefactoring
166   clangToolingSyntax
167   )
168 target_link_libraries(ClangdTests
169   PRIVATE
170   LLVMTestingAnnotations
171   LLVMTestingSupport
173   clangDaemon
174   clangIncludeCleaner
175   clangTesting
176   clangTidy
177   clangdSupport
178   )
180 if (CLANGD_ENABLE_REMOTE)
181   target_link_libraries(ClangdTests
182     PRIVATE
183     clangdRemoteMarshalling
184     clangdRemoteIndexProto)
185 endif()
187 if (CLANGD_BUILD_XPC)
188   add_subdirectory(xpc)
189 endif ()
191 configure_lit_site_cfg(
192   ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
193   ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py)