Skip to content

Commit 85a4a04

Browse files
authored
Merge pull request #23850 from compnerd/copy-machine
build: add a workaround for reflection test on Windows
2 parents 623738b + a5705d6 commit 85a4a04

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,11 @@ function(_add_swift_library_single target name)
10271027
set_target_properties("${target}" PROPERTIES
10281028
LIBRARY_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR}
10291029
ARCHIVE_OUTPUT_DIRECTORY ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
1030+
if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND SWIFTLIB_SINGLE_IS_STDLIB_CORE
1031+
AND libkind STREQUAL SHARED)
1032+
add_custom_command(TARGET ${target} POST_BUILD
1033+
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${target}> ${SWIFTLIB_DIR}/${SWIFTLIB_SINGLE_SUBDIR})
1034+
endif()
10301035

10311036
foreach(config ${CMAKE_CONFIGURATION_TYPES})
10321037
string(TOUPPER ${config} config_upper)

0 commit comments

Comments
 (0)