Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-picks to
release/6.0
for sourcekit-lsp update (#7520)
- **Explanation**: Cherry-pick the following to PRs which are companions of apple/sourcekit-lsp#1213 - #7505 - #7492 - **Scope**: CMake build and SourceKit-LSP API - **Risk**: Low, the SourceKit-LSP API is only used by SourceKit-LSP and the CMake build changes will all be caught at build-time - **Testing**: n/a - **Issue**: n/a - **Reviewer**: @DougGregor and @MaxDesiatov on #7505 and #7492 --------- Co-authored-by: Ben Barham <[email protected]>
- Loading branch information
Showing
5 changed files
with
60 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
include(FetchContent) | ||
|
||
set(BUILD_SHARED_LIBS OFF) | ||
|
||
if(DEFINED SWIFTPM_PATH_TO_SWIFT_SYNTAX_SOURCE) | ||
file(TO_CMAKE_PATH "${SWIFTPM_PATH_TO_SWIFT_SYNTAX_SOURCE}" swift_syntax_path) | ||
FetchContent_Declare(SwiftSyntax | ||
SOURCE_DIR "${swift_syntax_path}") | ||
else() | ||
FetchContent_Declare(SwiftSyntax | ||
GIT_REPOSITORY https://github.com/apple/swift-syntax | ||
GIT_TAG main) | ||
find_package(SwiftSyntax CONFIG GLOBAL) | ||
if(NOT SwiftSyntax_FOUND) | ||
set(SWIFT_SYNTAX_INSTALL_TARGETS YES) | ||
if(DEFINED SWIFTPM_PATH_TO_SWIFT_SYNTAX_SOURCE) | ||
file(TO_CMAKE_PATH "${SWIFTPM_PATH_TO_SWIFT_SYNTAX_SOURCE}" swift_syntax_path) | ||
FetchContent_Declare(SwiftSyntax | ||
SOURCE_DIR "${swift_syntax_path}") | ||
else() | ||
FetchContent_Declare(SwiftSyntax | ||
GIT_REPOSITORY https://github.com/apple/swift-syntax | ||
GIT_TAG main) | ||
endif() | ||
FetchContent_MakeAvailable(SwiftSyntax) | ||
endif() | ||
FetchContent_MakeAvailable(SwiftSyntax) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters