Skip to content

Commit

Permalink
Conditionalize the "--modify" parameter on whether the list is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
dabrahams committed Mar 4, 2024
1 parent 0e54d89 commit 4f7d408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/modules/FindSwiftXCTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ function(add_swift_xctest test_target testee)
OUTPUT ${test_main}
# If the executable target depends on DLLs their directories need to be injected into the PATH
# or they won't be found and the target will fail to run, so invoke it through cmake. Because
COMMAND
${CMAKE_COMMAND} -E env --modify
COMMAND ${CMAKE_COMMAND} -E env
$<$<LIST:LENGTH,$<TARGET_RUNTIME_DLL_DIRS:GenerateXCTestMain>>:--modify>
"$<LIST:TRANSFORM,$<TARGET_RUNTIME_DLL_DIRS:GenerateXCTestMain>,PREPEND,PATH=>"
--
$<TARGET_FILE:GenerateXCTestMain> -o ${test_main} ${sources}
Expand Down

0 comments on commit 4f7d408

Please sign in to comment.