Skip to content

Commit 8743107

Browse files
authored
Merge pull request #61178 from DougGregor/new-parser-build-cleanups
2 parents 0118c37 + 2428f6d commit 8743107

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CMakeLists.txt

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

873873
# When we have the early SwiftSyntax build, we can include its parser.
874874
if(SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR)
875-
set(SWIFT_SWIFT_PARSER TRUE)
876-
include(${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR}/cmake/SwiftSyntaxTargets.cmake)
875+
set(SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS
876+
${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR}/cmake/SwiftSyntaxTargets.cmake)
877+
if(NOT EXISTS "${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS}")
878+
message(STATUS "Skipping Swift Swift parser integration due to missing early SwiftSyntax")
879+
else()
880+
set(SWIFT_SWIFT_PARSER TRUE)
881+
include(${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS})
882+
endif()
877883
endif()
878884

879885

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ function(add_swift_unittest test_dirname)
8181

8282
if (SWIFT_SWIFT_PARSER)
8383
_add_swift_runtime_link_flags(${test_dirname} "../../lib" "")
84+
set_property(TARGET ${test_dirname} PROPERTY BUILD_WITH_INSTALL_RPATH OFF)
8485
endif()
8586
endfunction()
8687

0 commit comments

Comments
 (0)