diff --git a/lldb/unittests/Core/CMakeLists.txt b/lldb/unittests/Core/CMakeLists.txt index 15c57f3a29577..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 @@ -14,9 +22,10 @@ add_lldb_unittest(LLDBCoreTests SourceLocationSpecTest.cpp SourceManagerTest.cpp TelemetryTest.cpp - SwiftDemanglingPartsTest.cpp UniqueCStringMapTest.cpp + ${SWIFT_SOURCES} + LINK_COMPONENTS Support Telemetry