Debian Codegraph @

clang-tools-extra/clangd/unittests/CMakeLists.txt

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