[llvm] r285908 - [CMake] Make CMAKE_INSTALL_RPATH work again
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 3 06:55:04 PDT 2016
Author: john.brawn
Date: Thu Nov 3 08:55:04 2016
New Revision: 285908
URL: http://llvm.org/viewvc/llvm-project?rev=285908&view=rev
Log:
[CMake] Make CMAKE_INSTALL_RPATH work again
r285714 made it so that when CMAKE_INSTALL_RPATH is set _install_rpath is not
set, but that means INSTALL_RPATH gets set to an empty string which isn't what
we want. Fix this by setting INSTALL_RPATH only when _install_rpath is set.
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=285908&r1=285907&r2=285908&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Nov 3 08:55:04 2016
@@ -1351,8 +1351,10 @@ function(llvm_setup_rpath name)
return()
endif()
- set_target_properties(${name} PROPERTIES
- BUILD_WITH_INSTALL_RPATH On
- INSTALL_RPATH "${_install_rpath}"
- ${_install_name_dir})
+ if(DEFINED _install_rpath)
+ set_target_properties(${name} PROPERTIES
+ BUILD_WITH_INSTALL_RPATH On
+ INSTALL_RPATH "${_install_rpath}"
+ ${_install_name_dir})
+ endif()
endfunction()
More information about the llvm-commits
mailing list