| 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 |
FileDistanceTests.cpp |
| 58 |
FileIndexTests.cpp |
| 59 |
FindSymbolsTests.cpp |
| 60 |
FindTargetTests.cpp |
| 61 |
FormatTests.cpp |
| 62 |
FSTests.cpp |
| 63 |
FuzzyMatchTests.cpp |
| 64 |
GlobalCompilationDatabaseTests.cpp |
| 65 |
HeadersTests.cpp |
| 66 |
HeaderSourceSwitchTests.cpp |
| 67 |
HoverTests.cpp |
| 68 |
IncludeCleanerTests.cpp |
| 69 |
IndexActionTests.cpp |
| 70 |
IndexTests.cpp |
| 71 |
InlayHintTests.cpp |
| 72 |
InsertionPointTests.cpp |
| 73 |
JSONTransportTests.cpp |
| 74 |
LoggerTests.cpp |
| 75 |
LSPBinderTests.cpp |
| 76 |
LSPClient.cpp |
| 77 |
PrerequisiteModulesTest.cpp |
| 78 |
ModulesTests.cpp |
| 79 |
ParsedASTTests.cpp |
| 80 |
PathMappingTests.cpp |
| 81 |
PreambleTests.cpp |
| 82 |
PrintASTTests.cpp |
| 83 |
ProjectAwareIndexTests.cpp |
| 84 |
QualityTests.cpp |
| 85 |
RIFFTests.cpp |
| 86 |
RenameTests.cpp |
| 87 |
ReplayPeambleTests.cpp |
| 88 |
SelectionTests.cpp |
| 89 |
SemanticHighlightingTests.cpp |
| 90 |
SemanticSelectionTests.cpp |
| 91 |
SerializationTests.cpp |
| 92 |
SourceCodeTests.cpp |
| 93 |
StdLibTests.cpp |
| 94 |
SymbolCollectorTests.cpp |
| 95 |
SymbolInfoTests.cpp |
| 96 |
SyncAPI.cpp |
| 97 |
TUSchedulerTests.cpp |
| 98 |
TestFS.cpp |
| 99 |
TestIndex.cpp |
| 100 |
TestTU.cpp |
| 101 |
TestWorkspace.cpp |
| 102 |
ThreadCrashReporterTests.cpp |
| 103 |
TidyProviderTests.cpp |
| 104 |
TypeHierarchyTests.cpp |
| 105 |
URITests.cpp |
| 106 |
XRefsTests.cpp |
| 107 |
${CMAKE_CURRENT_BINARY_DIR}/DecisionForestRuntimeTest.cpp |
| 108 |
|
| 109 |
support/CancellationTests.cpp |
| 110 |
support/ContextTests.cpp |
| 111 |
support/FileCacheTests.cpp |
| 112 |
support/FunctionTests.cpp |
| 113 |
support/MarkupTests.cpp |
| 114 |
support/MemoryTreeTests.cpp |
| 115 |
support/PathTests.cpp |
| 116 |
support/TestTracer.cpp |
| 117 |
support/ThreadingTests.cpp |
| 118 |
support/TraceTests.cpp |
| 119 |
|
| 120 |
tweaks/AddUsingTests.cpp |
| 121 |
tweaks/AnnotateHighlightingsTests.cpp |
| 122 |
tweaks/DefineInlineTests.cpp |
| 123 |
tweaks/DefineOutlineTests.cpp |
| 124 |
tweaks/DumpASTTests.cpp |
| 125 |
tweaks/DumpRecordLayoutTests.cpp |
| 126 |
tweaks/DumpSymbolTests.cpp |
| 127 |
tweaks/ExpandDeducedTypeTests.cpp |
| 128 |
tweaks/ExpandMacroTests.cpp |
| 129 |
tweaks/ExtractFunctionTests.cpp |
| 130 |
tweaks/ExtractVariableTests.cpp |
| 131 |
tweaks/MemberwiseConstructorTests.cpp |
| 132 |
tweaks/ObjCLocalizeStringLiteralTests.cpp |
| 133 |
tweaks/ObjCMemberwiseInitializerTests.cpp |
| 134 |
tweaks/PopulateSwitchTests.cpp |
| 135 |
tweaks/RawStringLiteralTests.cpp |
| 136 |
tweaks/RemoveUsingNamespaceTests.cpp |
| 137 |
tweaks/ScopifyEnumTests.cpp |
| 138 |
tweaks/ShowSelectionTreeTests.cpp |
| 139 |
tweaks/SpecialMembersTests.cpp |
| 140 |
tweaks/SwapIfBranchesTests.cpp |
| 141 |
tweaks/TweakTesting.cpp |
| 142 |
tweaks/TweakTests.cpp |
| 143 |
|
| 144 |
${REMOTE_TEST_SOURCES} |
| 145 |
|
| 146 |
$<TARGET_OBJECTS:obj.clangDaemonTweaks> |
| 147 |
) |
| 148 |
|
| 149 |
# Include generated ComletionModel headers. |
| 150 |
target_include_directories(ClangdTests PUBLIC |
| 151 |
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> |
| 152 |
) |
| 153 |
|
| 154 |
clang_target_link_libraries(ClangdTests |
| 155 |
PRIVATE |
| 156 |
clangAST |
| 157 |
clangASTMatchers |
| 158 |
clangBasic |
| 159 |
clangFormat |
| 160 |
clangFrontend |
| 161 |
clangIndex |
| 162 |
clangLex |
| 163 |
clangSema |
| 164 |
clangSerialization |
| 165 |
clangTooling |
| 166 |
clangToolingCore |
| 167 |
clangToolingInclusions |
| 168 |
clangToolingInclusionsStdlib |
| 169 |
clangToolingRefactoring |
| 170 |
clangToolingSyntax |
| 171 |
) |
| 172 |
target_link_libraries(ClangdTests |
| 173 |
PRIVATE |
| 174 |
LLVMTestingAnnotations |
| 175 |
LLVMTestingSupport |
| 176 |
|
| 177 |
clangDaemon |
| 178 |
clangIncludeCleaner |
| 179 |
clangTesting |
| 180 |
clangTidy |
| 181 |
clangTidyUtils |
| 182 |
clangdSupport |
| 183 |
) |
| 184 |
|
| 185 |
if (CLANGD_ENABLE_REMOTE) |
| 186 |
target_link_libraries(ClangdTests |
| 187 |
PRIVATE |
| 188 |
clangdRemoteMarshalling |
| 189 |
clangdRemoteIndexProto) |
| 190 |
endif() |
| 191 |
|
| 192 |
if (CLANGD_BUILD_XPC) |
| 193 |
add_subdirectory(xpc) |
| 194 |
endif () |
| 195 |
|
| 196 |
configure_lit_site_cfg( |
| 197 |
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in |
| 198 |
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py) |