Skip to content

Commit e06fced

Browse files
authored
[cmake] [unittests] remove unnecessary scripts (#40279)
gtest, gtest_main LINK_LIBRARIES dependencies changed by that removed scripts to absolute library file path. as a result losing necessary include path dirs.
1 parent 8e8b9a1 commit e06fced

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,6 @@ function(add_swift_unittest test_dirname)
2121
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY LINK_FLAGS " ${_lto_flag_out} ")
2222
endif()
2323

24-
if(SWIFT_BUILT_STANDALONE AND NOT "${CMAKE_CFG_INTDIR}" STREQUAL ".")
25-
# Replace target references with full paths, so that we use LLVM's
26-
# build configuration rather than Swift's.
27-
get_target_property(libnames ${test_dirname} LINK_LIBRARIES)
28-
29-
set(new_libnames)
30-
foreach(dep ${libnames})
31-
if("${dep}" MATCHES "^(LLVM|Clang|gtest)" AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
32-
list(APPEND new_libnames "${LLVM_LIBRARY_OUTPUT_INTDIR}/lib${dep}.a")
33-
else()
34-
list(APPEND new_libnames "${dep}")
35-
endif()
36-
endforeach()
37-
38-
set_property(TARGET ${test_dirname} PROPERTY LINK_LIBRARIES ${new_libnames})
39-
swift_common_llvm_config(${test_dirname} support)
40-
endif()
41-
4224
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
4325
# Add an @rpath to the swift library directory.
4426
set_target_properties(${test_dirname} PROPERTIES

0 commit comments

Comments
 (0)