diff --git a/lldb/unittests/Core/CMakeLists.txt b/lldb/unittests/Core/CMakeLists.txt index 77c084db5a9c5..9d11c02d9837c 100644 --- a/lldb/unittests/Core/CMakeLists.txt +++ b/lldb/unittests/Core/CMakeLists.txt @@ -1,3 +1,11 @@ +set(SWIFT_SOURCES + SwiftDemanglingPartsTest.cpp +) + +set(LLVM_OPTIONAL_SOURCES ${SWIFT_SOURCES}) +if (NOT LLDB_ENABLE_SWIFT_SUPPORT) + unset(SWIFT_SOURCES) +endif() add_lldb_unittest(LLDBCoreTests DebuggerTest.cpp @@ -13,10 +21,11 @@ add_lldb_unittest(LLDBCoreTests RichManglingContextTest.cpp SourceLocationSpecTest.cpp SourceManagerTest.cpp - SwiftDemanglingPartsTest.cpp TelemetryTest.cpp UniqueCStringMapTest.cpp + ${SWIFT_SOURCES} + LINK_COMPONENTS Support Telemetry