File tree Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Expand file tree Collapse file tree 3 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ macro(swift_swap_compiler_if_needed target)
104
104
endif ()
105
105
set (CMAKE_C_COMPILER_ID Clang )
106
106
set (CMAKE_CXX_COMPILER_ID Clang )
107
+ set (SOURCEKIT_SWIFT_SWAP_COMPILER TRUE )
107
108
message (STATUS "C/C++ compiler for ${target} is set to: ${CMAKE_C_COMPILER} " )
108
109
else ()
109
110
message (SEND_ERROR "${target} requires a clang based compiler. Please set SWIFT_CLANG_LOCATION." )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
8
8
message (SEND_ERROR "SourceKit cannot be built standalone" )
9
9
endif ()
10
10
11
+ set (SOURCEKIT_SWIFT_SWAP_COMPILER FALSE )
11
12
include (SwiftWindowsSupport )
12
13
swift_swap_compiler_if_needed ("SourceKit" )
13
14
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ macro(add_sourcekit_library name)
235
235
set (libkind )
236
236
endif ()
237
237
add_library (${name} ${libkind} ${srcs} )
238
- if (NOT SWIFT_BUILT_STANDALONE AND NOT CMAKE_C_COMPILER_ID MATCHES Clang )
238
+ if (NOT SWIFT_BUILT_STANDALONE AND SOURCEKIT_SWIFT_SWAP_COMPILER )
239
239
add_dependencies (${name} clang )
240
240
endif ()
241
241
llvm_update_compile_flags (${name} )
@@ -325,7 +325,7 @@ macro(add_sourcekit_executable name)
325
325
"${SOURCEKIT_EXECUTABLE_multiple_parameter_options} " ${ARGN} )
326
326
327
327
add_executable (${name} ${SOURCEKITEXE_UNPARSED_ARGUMENTS} )
328
- if (NOT SWIFT_BUILT_STANDALONE AND NOT CMAKE_C_COMPILER_ID MATCHES Clang )
328
+ if (NOT SWIFT_BUILT_STANDALONE AND SOURCEKIT_SWIFT_SWAP_COMPILER )
329
329
add_dependencies (${name} clang )
330
330
endif ()
331
331
llvm_update_compile_flags (${name} )
You can’t perform that action at this time.
0 commit comments