forked from OSchip/llvm-project
Correctly set rpath for unittests.
This lets us run the unittest from the command line without setting LD_LIBRARY_PATH. llvm-svn: 202509
This commit is contained in:
parent
722311edc8
commit
9e806cf938
|
@ -1,6 +1,12 @@
|
|||
add_custom_target(UnitTests)
|
||||
set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
|
||||
|
||||
if (APPLE)
|
||||
set(CMAKE_INSTALL_RPATH "@executable_path/../../lib")
|
||||
else(UNIX)
|
||||
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../../lib")
|
||||
endif()
|
||||
|
||||
function(add_llvm_unittest test_dirname)
|
||||
add_unittest(UnitTests ${test_dirname} ${ARGN})
|
||||
endfunction()
|
||||
|
|
Loading…
Reference in New Issue