File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change
1
+ set (framework "FrameworkABIBaseline" )
1
2
swift_install_in_component (FILES "swift-api-checker.py"
2
3
DESTINATION "bin"
3
4
COMPONENT toolchain-tools )
4
5
swift_install_in_component (DIRECTORY "sdk-module-lists"
5
6
DESTINATION "bin"
6
7
COMPONENT toolchain-tools )
7
- swift_install_in_component (DIRECTORY "FrameworkABIBaseline "
8
+ swift_install_in_component (DIRECTORY "${framework} "
8
9
DESTINATION "lib/swift"
9
10
COMPONENT toolchain-tools )
11
+
12
+ # Add symlink of FrameworkABIBaseline to the build dir. This ensures we can
13
+ # find the baseline data from the same relative path as if we are running the
14
+ # checker from the toolchain.
15
+ set (SWIFTLIB_DIR "${CMAKE_BINARY_DIR} /${CMAKE_CFG_INTDIR} /lib/swift" )
16
+ set (dest "${SWIFTLIB_DIR} /${framework} " )
17
+ set (source "${CMAKE_CURRENT_SOURCE_DIR} /${framework} " )
18
+
19
+ if (CMAKE_SYSTEM_NAME STREQUAL Windows )
20
+ set (CMAKE_SYMLINK_COMMAND copy )
21
+ else ()
22
+ set (CMAKE_SYMLINK_COMMAND create_symlink )
23
+ endif ()
24
+ add_custom_command (OUTPUT "${dest} "
25
+ DEPENDS "${source} "
26
+ COMMAND "${CMAKE_COMMAND} " "-E" "${CMAKE_SYMLINK_COMMAND} " "${source} " "${dest} " )
27
+ add_custom_target ("symlink_abi_checker_data" ALL
28
+ DEPENDS "${dest} "
29
+ COMMENT "Symlinking ABI checker baseline data to ${dest} " )
You can’t perform that action at this time.
0 commit comments