File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 70e88ccc24460be7eabb52bb7403fdee5e9b155c
2
+ refs/heads/master: 595df9e586df43bba7ba9bf084c5062e6cb46759
3
3
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
4
4
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
5
5
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea
Original file line number Diff line number Diff line change @@ -4,6 +4,31 @@ include(CheckSymbolExists)
4
4
list (APPEND CMAKE_MODULE_PATH
5
5
"${CMAKE_CURRENT_SOURCE_DIR} /cmake/modules" )
6
6
7
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
8
+ message (SEND_ERROR "SourceKit cannot be built standalone" )
9
+ endif ()
10
+
11
+ if (NOT CMAKE_C_COMPILER_ID MATCHES Clang )
12
+ if (CMAKE_SYSTEM_NAME STREQUAL CMAKE_HOST_SYSTEM_NAME )
13
+ get_target_property (CLANG_LOCATION clang LOCATION )
14
+ get_filename_component (CLANG_LOCATION ${CLANG_LOCATION} DIRECTORY )
15
+
16
+ if (CMAKE_C_COMPILER_ID STREQUAL MSVC OR CMAKE_C_SIMULATE_ID STREQUAL MSVC )
17
+ set (CMAKE_C_COMPILER_ID
18
+ ${CLANG_LOCATION} /clang-cl${CMAKE_EXECUTABLE_SUFFIX} )
19
+ set (CMAKE_CXX_COMPILER_ID
20
+ ${CLANG_LOCATION} /clang-cl${CMAKE_EXECUTABLE_SUFFIX} )
21
+ else ()
22
+ set (CMAKE_C_COMPILER_ID
23
+ ${CLANG_LOCATION} /clang${CMAKE_EXECUTABLE_SUFFIX} )
24
+ set (CMAKE_CXX_COMPILER_ID
25
+ ${CLANG_LOCATION} /clang++${CMAKE_EXECUTABLE_SUFFIX} )
26
+ endif ()
27
+ else ()
28
+ message (SEND_ERROR "SourceKit requires a clang based compiler" )
29
+ endif ()
30
+ endif ()
31
+
7
32
if (DARWIN_TOOLCHAIN_VERSION )
8
33
set (SOURCEKIT_VERSION_STRING "${DARWIN_TOOLCHAIN_VERSION} " )
9
34
else ()
You can’t perform that action at this time.
0 commit comments