diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-28 16:11:03 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-28 16:11:03 +0000 |
commit | 9e806cf938c1c161fe63c39c52e3f7e02d1f4aee (patch) | |
tree | 16a4ec1ed324e7d31ebeeaa99739c0fb1a4c7b95 /llvm/unittests/CMakeLists.txt | |
parent | 722311edc87efc46e86d1884c470de3a0cd53bf7 (diff) | |
download | bcm5719-llvm-9e806cf938c1c161fe63c39c52e3f7e02d1f4aee.tar.gz bcm5719-llvm-9e806cf938c1c161fe63c39c52e3f7e02d1f4aee.zip |
Correctly set rpath for unittests.
This lets us run the unittest from the command line without setting
LD_LIBRARY_PATH.
llvm-svn: 202509
Diffstat (limited to 'llvm/unittests/CMakeLists.txt')
-rw-r--r-- | llvm/unittests/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt index 84685e1c24d..9e2f60c7b87 100644 --- a/llvm/unittests/CMakeLists.txt +++ b/llvm/unittests/CMakeLists.txt @@ -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() |