File tree 8 files changed +27
-19
lines changed
8 files changed +27
-19
lines changed Original file line number Diff line number Diff line change @@ -465,10 +465,7 @@ option(SWIFT_BUILD_SOURCEKIT "Build SourceKit" TRUE)
465
465
option (SWIFT_ENABLE_SOURCEKIT_TESTS "Enable running SourceKit tests" ${SWIFT_BUILD_SOURCEKIT} )
466
466
467
467
if (SWIFT_BUILD_SYNTAXPARSERLIB OR SWIFT_BUILD_SOURCEKIT)
468
- if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
469
- set (SWIFT_NEED_EXPLICIT_LIBDISPATCH FALSE )
470
- else ()
471
- set (SWIFT_NEED_EXPLICIT_LIBDISPATCH TRUE )
468
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
472
469
if (NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE} " )
473
470
message (SEND_ERROR "SyntaxParserLib and SourceKit require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE" )
474
471
endif ()
@@ -954,7 +951,7 @@ if (LLVM_ENABLE_DOXYGEN)
954
951
message (STATUS "Doxygen: enabled" )
955
952
endif ()
956
953
957
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH )
954
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin )
958
955
if (CMAKE_C_COMPILER_ID STREQUAL Clang AND
959
956
CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.8
960
957
OR LLVM_USE_SANITIZER)
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ target_link_libraries(SourceKitSupport PRIVATE
11
11
swiftSyntax
12
12
clangBasic
13
13
clangRewrite)
14
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
15
- target_link_libraries (SourceKitSupport INTERFACE dispatch BlocksRuntime)
14
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
15
+ target_link_libraries (SourceKitSupport INTERFACE
16
+ dispatch
17
+ BlocksRuntime)
16
18
endif ()
17
19
Original file line number Diff line number Diff line change @@ -7,8 +7,10 @@ if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
7
7
else ()
8
8
target_link_libraries (complete-test PRIVATE sourcekitd)
9
9
endif ()
10
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
11
- target_link_libraries (complete-test PRIVATE dispatch BlocksRuntime)
10
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
11
+ target_link_libraries (complete-test PRIVATE
12
+ dispatch
13
+ BlocksRuntime)
12
14
endif ()
13
15
14
16
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
Original file line number Diff line number Diff line change @@ -12,8 +12,10 @@ if(HAVE_UNICODE_LIBEDIT)
12
12
else ()
13
13
target_link_libraries (sourcekitd-repl PRIVATE sourcekitd)
14
14
endif ()
15
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
16
- target_link_libraries (sourcekitd-repl PRIVATE dispatch BlocksRuntime)
15
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
16
+ target_link_libraries (sourcekitd-repl PRIVATE
17
+ dispatch
18
+ BlocksRuntime)
17
19
endif ()
18
20
19
21
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
Original file line number Diff line number Diff line change @@ -17,8 +17,10 @@ if(SWIFT_SOURCEKIT_USE_INPROC_LIBRARY)
17
17
else ()
18
18
target_link_libraries (sourcekitd-test PRIVATE sourcekitd)
19
19
endif ()
20
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
21
- target_link_libraries (sourcekitd-test PRIVATE dispatch BlocksRuntime)
20
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
21
+ target_link_libraries (sourcekitd-test PRIVATE
22
+ dispatch
23
+ BlocksRuntime)
22
24
endif ()
23
25
24
26
add_dependencies (sourcekitd-test sourcekitdTestOptionsTableGen)
Original file line number Diff line number Diff line change @@ -45,8 +45,9 @@ endif()
45
45
46
46
set_property (TARGET libSwiftSyntaxParser APPEND_STRING PROPERTY
47
47
COMPILE_FLAGS " -fblocks" )
48
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
49
- target_link_libraries (libSwiftSyntaxParser PRIVATE BlocksRuntime)
48
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
49
+ target_link_libraries (libSwiftSyntaxParser PRIVATE
50
+ BlocksRuntime)
50
51
endif ()
51
52
52
53
add_dependencies (parser-lib libSwiftSyntaxParser)
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ endif()
27
27
28
28
set_property (TARGET swift-syntax-parser-test APPEND_STRING PROPERTY
29
29
COMPILE_FLAGS " -fblocks" )
30
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
31
- target_link_libraries (swift-syntax-parser-test PRIVATE BlocksRuntime)
30
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
31
+ target_link_libraries (swift-syntax-parser-test PRIVATE
32
+ BlocksRuntime)
32
33
endif ()
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ endif()
24
24
25
25
set_property (TARGET SwiftSyntaxParserTests APPEND_STRING PROPERTY
26
26
COMPILE_FLAGS " -fblocks" )
27
- if (SWIFT_NEED_EXPLICIT_LIBDISPATCH)
28
- target_link_libraries (SwiftSyntaxParserTests PRIVATE BlocksRuntime)
27
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
28
+ target_link_libraries (SwiftSyntaxParserTests PRIVATE
29
+ BlocksRuntime)
29
30
endif ()
You can’t perform that action at this time.
0 commit comments