[PATCH] D93177: [CMake] Don't enable BUILD_WITH_INSTALL_RPATH when using custom build rpath
Raul Tambre via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 13 03:51:41 PST 2020
tambre updated this revision to Diff 311437.
tambre added a comment.
Fix all occurrences. Keep INSTALL_RPATH and only disable BUILD_WITH_INSTALL_RPATH.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93177/new/
https://reviews.llvm.org/D93177
Files:
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/cmake/modules/AddLLVM.cmake
@@ -865,9 +865,16 @@
if(NOT ARG_NO_INSTALL_RPATH)
llvm_setup_rpath(${name})
- elseif (LLVM_LOCAL_RPATH)
+ else()
+ # If CMAKE_BUILD_RPATH is set keep BUILD_WITH_INSTALL_RPATH off so it's used.
+ if("${CMAKE_BUILD_RPATH}" STREQUAL "")
+ set(build_with_install ON)
+ else()
+ set(build_with_install OFF)
+ endif()
+
set_target_properties(${name} PROPERTIES
- BUILD_WITH_INSTALL_RPATH On
+ BUILD_WITH_INSTALL_RPATH ${build_with_install}
INSTALL_RPATH "${LLVM_LOCAL_RPATH}")
endif()
@@ -2113,8 +2120,15 @@
return()
endif()
+ # If CMAKE_BUILD_RPATH is set keep BUILD_WITH_INSTALL_RPATH off so it's used.
+ if("${CMAKE_BUILD_RPATH}" STREQUAL "")
+ set(build_with_install ON)
+ else()
+ set(build_with_install OFF)
+ endif()
+
set_target_properties(${name} PROPERTIES
- BUILD_WITH_INSTALL_RPATH On
+ BUILD_WITH_INSTALL_RPATH ${build_with_install}
INSTALL_RPATH "${_install_rpath}"
${_install_name_dir})
endfunction()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93177.311437.patch
Type: text/x-patch
Size: 1333 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201213/f6865ec4/attachment.bin>
More information about the llvm-commits
mailing list