File tree Expand file tree Collapse file tree 4 files changed +18
-10
lines changed
SourceKit/tools/sourcekitd Expand file tree Collapse file tree 4 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ set_property(GLOBAL PROPERTY JOB_POOL_LINK local_jobs)
14
14
# First include general CMake utilities.
15
15
include (SwiftUtils )
16
16
include (CheckSymbolExists )
17
+ include (CheckIncludeFiles )
18
+
19
+ check_include_files ("xpc/xpc.h" HAVE_XPC_H )
17
20
18
21
#
19
22
# User-configurable options that control the inclusion and default build
@@ -393,6 +396,12 @@ option(SWIFT_ENABLE_SOURCEKIT_TESTS
393
396
"Enable running SourceKit tests"
394
397
${SWIFT_BUILD_SOURCEKIT_default} )
395
398
399
+ if (HAVE_XPC_H AND SWIFT_BUILD_SOURCEKIT )
400
+ set (BUILD_SOURCEKIT_FRAMEWORK TRUE )
401
+ else ()
402
+ set (BUILD_SOURCEKIT_FRAMEWORK FALSE )
403
+ endif ()
404
+
396
405
#
397
406
# Assume a new enough ar to generate the index at construction time. This avoids
398
407
# having to invoke ranlib as a secondary command.
Original file line number Diff line number Diff line change @@ -16,9 +16,15 @@ add_swift_tool_subdirectory(swift-api-digester)
16
16
add_swift_tool_subdirectory (swift-syntax-test )
17
17
add_swift_tool_subdirectory (swift-refactor )
18
18
19
+ if (SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY )
20
+ set (BUILD_FOUNDATION TRUE )
21
+ else ()
22
+ set (BUILD_FOUNDATION FALSE )
23
+ endif ()
24
+
19
25
if (SWIFT_BUILD_SOURCEKIT )
20
26
add_swift_tool_subdirectory (SourceKit )
21
- if (BUILD_SOURCEKIT_FRAMEWORK AND SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY )
27
+ if (BUILD_SOURCEKIT_FRAMEWORK AND BUILD_FOUNDATION )
22
28
set (BUILD_SOURCEKIT_SWIFT_CLIENT TRUE )
23
29
else ()
24
30
set (BUILD_SOURCEKIT_SWIFT_CLIENT FALSE )
@@ -35,7 +41,7 @@ if(SWIFT_HOST_VARIANT STREQUAL "macosx")
35
41
# SwiftSyntax depends on both the standard library (because it's a
36
42
# Swift module), and the SDK overlays (because it depends on Foundation).
37
43
# Ensure we only build SwiftSyntax when we're building both.
38
- if (SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY )
44
+ if (BUILD_FOUNDATION )
39
45
add_subdirectory (SwiftSyntax )
40
46
endif ()
41
47
endif ()
Original file line number Diff line number Diff line change 1
1
add_subdirectory (InProc )
2
- if (HAVE_XPC_H )
3
- set (BUILD_SOURCEKIT_FRAMEWORK TRUE )
2
+ if (BUILD_SOURCEKIT_FRAMEWORK )
4
3
add_subdirectory (XPC )
5
- else ()
6
- set (BUILD_SOURCEKIT_FRAMEWORK FALSE )
7
4
endif ()
Original file line number Diff line number Diff line change 1
- include (CheckIncludeFiles )
2
-
3
- check_include_files ("xpc/xpc.h" HAVE_XPC_H )
4
-
5
1
# If we were going to build for APPLE but don't have XPC, just build inproc.
6
2
if (APPLE AND NOT HAVE_XPC_H )
7
3
set (SWIFT_SOURCEKIT_USE_INPROC_LIBRARY TRUE )
You can’t perform that action at this time.
0 commit comments