[CMake] Fix rpath construction for out-of-tree builds
authorChris Bieneman <beanz@apple.com>
Tue, 1 Nov 2016 17:44:58 +0000 (17:44 +0000)
committerChris Bieneman <beanz@apple.com>
Tue, 1 Nov 2016 17:44:58 +0000 (17:44 +0000)
commit61e900b4057dff9c9a5d7e8b0a2cffd2e861414b
tree8b6de4f7c9090c346fd7f97947764efec36a2726
parent700193ae052850d4a3ef77e17b12854305405764
[CMake] Fix rpath construction for out-of-tree builds

This patch was produced in conjunction with Michał Górny. It should resolve the issues that were trying to be solved by D25304.

This moves rpath handling into `llvm_add_library` and `add_llvm_executable` so that it is available to all projects using AddLLVM whether built in-tree or out-of-tree.

llvm-svn: 285714
llvm/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake