[llvm] r202509 - Correctly set rpath for unittests.
Rafael Espindola
rafael.espindola at gmail.com
Fri Feb 28 08:11:03 PST 2014
Author: rafael
Date: Fri Feb 28 10:11:03 2014
New Revision: 202509
URL: http://llvm.org/viewvc/llvm-project?rev=202509&view=rev
Log:
Correctly set rpath for unittests.
This lets us run the unittest from the command line without setting
LD_LIBRARY_PATH.
Modified:
llvm/trunk/unittests/CMakeLists.txt
Modified: llvm/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=202509&r1=202508&r2=202509&view=diff
==============================================================================
--- llvm/trunk/unittests/CMakeLists.txt (original)
+++ llvm/trunk/unittests/CMakeLists.txt Fri Feb 28 10:11:03 2014
@@ -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()
More information about the llvm-commits
mailing list