Skip to content

Commit e37b227

Browse files
authored
Merge pull request #5322 from DougGregor/lldb-swift-parser-not-avail
2 parents 47d54b9 + 5e514ee commit e37b227

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lldb/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ endif()
4545

4646
# When we have the early SwiftSyntax build, we can include its parser.
4747
if(SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR)
48-
set(SWIFT_SWIFT_PARSER TRUE)
49-
include(${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR}/cmake/SwiftSyntaxTargets.cmake)
48+
set(SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS
49+
${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR}/cmake/SwiftSyntaxTargets.cmake)
50+
if(NOT EXISTS "${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS}")
51+
message(STATUS "Skipping Swift Swift parser integration due to missing early SwiftSyntax")
52+
else()
53+
set(SWIFT_SWIFT_PARSER TRUE)
54+
include(${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS})
55+
endif()
5056
endif()
5157
# END - Swift Mods
5258

0 commit comments

Comments
 (0)