Skip to content

Commit 87e3453

Browse files
committed
remove unnecessary scripts
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 909898e commit 87e3453

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

cmake/modules/AddSwiftUnittests.cmake

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ function(add_swift_unittest test_dirname)
1010
# function defined by AddLLVM.cmake.
1111
add_unittest(SwiftUnitTests ${test_dirname} ${ARGN})
1212

13-
target_include_directories(${test_dirname} PUBLIC ${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
14-
target_include_directories(${test_dirname} PUBLIC ${LLVM_MAIN_SRC_DIR}/utils/unittest/googlemock/include)
15-
1613
# TODO: _add_variant_c_compile_link_flags and these tests should share some
1714
# sort of logic.
1815
#
@@ -24,24 +21,6 @@ function(add_swift_unittest test_dirname)
2421
set_property(TARGET "${test_dirname}" APPEND_STRING PROPERTY LINK_FLAGS " ${_lto_flag_out} ")
2522
endif()
2623

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

0 commit comments

Comments
 (0)