add_custom_target(LLDUnitTests)
set_target_properties(LLDUnitTests PROPERTIES FOLDER "lld tests")

# add_lld_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against lld
# Produces a binary named 'basename(test_dirname)'.
function(add_lld_unittest test_dirname)
  add_unittest(LLDUnitTests ${test_dirname} ${ARGN})
  target_link_libraries(${test_dirname} ${LLVM_COMMON_LIBS})
endfunction()

add_subdirectory(CoreTests)
add_subdirectory(DriverTests)
add_subdirectory(MachOTests)

add_custom_target(LLDUnitTests)
set_target_properties(LLDUnitTests PROPERTIES FOLDER "lld tests")

set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)

# add_lld_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against lld
# Produces a binary named 'basename(test_dirname)'.
function(add_lld_unittest test_dirname)
  add_unittest(LLDUnitTests ${test_dirname} ${ARGN})
  target_link_libraries(${test_dirname} ${LLVM_COMMON_LIBS})
endfunction()

add_subdirectory(CoreTests)
add_subdirectory(DriverTests)
add_subdirectory(MachOTests)

Use Cmake's default RPATH for unittest.
[Cmake] Use Cmake's default RPATH for unittest.

Similarly to what was done in r280791 for llvm/.
This should fix a bunch of failures I saw while
trying a BUILD_SHARED_LIBS build on MacOS.
Still there are some failures, but this is a step
forward.

Thanks a lot to Chris Bieneman for the suggested
fix (in PR30345)


git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@281256 91177308-0d34-0410-b5e6-96231b3b80d8
