Skip to content

Commit 2da7c70

Browse files
authored
Merge pull request #32870 from davezarzycki/pr32870
[CMake] Fix dependency on the build directory
2 parents d7bd5ae + 580a525 commit 2da7c70

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

test/CMakeLists.txt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,10 @@ function(get_test_dependencies SDK result_var_name)
114114
message(FATAL_ERROR "Unknown SDK: ${SDK}")
115115
endif()
116116

117-
if(XCODE)
118-
# Xcode's build paths have a configuration variable in them,
119-
# so CMake can't match them at compile time. Just use target names.
120-
list(APPEND deps ${deps_binaries})
121-
else()
122-
foreach(binary ${deps_binaries})
123-
list(APPEND deps "${SWIFT_NATIVE_SWIFT_TOOLS_PATH}/${binary}${CMAKE_EXECUTABLE_SUFFIX}")
124-
endforeach()
125-
endif()
117+
# Just use target names for dependency generation. This works for both Xcode
118+
# and non-Xcode build systems. In the case of Xcode, its build paths have a
119+
# configuration variable in them, so CMake can't match them at compile time.
120+
list(APPEND deps ${deps_binaries})
126121

127122
set("${result_var_name}" "${deps}" PARENT_SCOPE)
128123
endfunction()

0 commit comments

Comments
 (0)