[PATCH] D28295: [libunwind] [cmake] Support overriding LLVM_CMAKE_PATH

Michał Górny via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 4 08:07:05 PST 2017


mgorny created this revision.
mgorny added reviewers: mclow.lists, beanz, phosek, EricWF.
mgorny added a subscriber: cfe-commits.

Make LLVM_CMAKE_PATH a cache variable in order to support user
overrides. This is useful when building multiple multilib variants of
libunwind using CMake files from a single-ABI install of LLVM, e.g. when
LLVM_LIBDIR_SUFFIX == "32" but CMake files are to be found in
/usr/lib64/cmake/llvm. Since libunwind is not using any of the LLVM
build configuration variables (just generic macros), it is fine to use
CMake files from a different ABI.


https://reviews.llvm.org/D28295

Files:
  CMakeLists.txt


Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -43,7 +43,8 @@
     set(LLVM_INCLUDE_DIR ${INCLUDE_DIR} CACHE PATH "Path to llvm/include")
     set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
     set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
-    set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+    set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm"
+        CACHE PATH "Path to LLVM CMake modules")
     set(LLVM_LIT_PATH "${LLVM_PATH}/utils/lit/lit.py")
   else()
     message(FATAL_ERROR "llvm-config not found and LLVM_MAIN_SRC_DIR not defined. "


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28295.83058.patch
Type: text/x-patch
Size: 750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170104/010fb7b0/attachment.bin>


More information about the cfe-commits mailing list