Skip to content

Commit 451fd09

Browse files
authored
Merge pull request #32499 from compnerd/no-more-arguing
build: correct handling of argument generation
2 parents da23205 + b9476ce commit 451fd09

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,11 @@ function(add_swift_unittest test_dirname)
5757
_ENABLE_EXTENDED_ALIGNED_STORAGE)
5858
endif()
5959

60-
if(SWIFT_USE_LINKER)
61-
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY
62-
LINK_FLAGS " -fuse-ld=${SWIFT_USE_LINKER}")
60+
if(NOT SWIFT_COMPILER_IS_MSVC_LIKE)
61+
if(SWIFT_USE_LINKER)
62+
target_link_options(${test_dirname} PRIVATE
63+
-fuse-ld=${SWIFT_USE_LINKER}$<$<STREQUAL:${CMAKE_HOST_SYSTEM_NAME},Windows>:.exe>)
64+
endif()
6365
endif()
6466

6567
if(SWIFT_ANALYZE_CODE_COVERAGE)

0 commit comments

Comments
 (0)