[PATCH] D24005: [compiler-rt cmake] Support overriding llvm-config query results
Michał Górny via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 12:20:04 PDT 2016
mgorny updated this revision to Diff 71040.
Herald added subscribers: mgorny, beanz.
https://reviews.llvm.org/D24005
Files:
cmake/Modules/CompilerRTUtils.cmake
Index: cmake/Modules/CompilerRTUtils.cmake
===================================================================
--- cmake/Modules/CompilerRTUtils.cmake
+++ cmake/Modules/CompilerRTUtils.cmake
@@ -197,10 +197,15 @@
message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
endif()
string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" CONFIG_OUTPUT ${CONFIG_OUTPUT})
- list(GET CONFIG_OUTPUT 0 LLVM_BINARY_DIR)
- list(GET CONFIG_OUTPUT 1 LLVM_TOOLS_BINARY_DIR)
- list(GET CONFIG_OUTPUT 2 LLVM_LIBRARY_DIR)
- list(GET CONFIG_OUTPUT 3 LLVM_MAIN_SRC_DIR)
+ list(GET CONFIG_OUTPUT 0 BINARY_DIR)
+ list(GET CONFIG_OUTPUT 1 TOOLS_BINARY_DIR)
+ list(GET CONFIG_OUTPUT 2 LIBRARY_DIR)
+ list(GET CONFIG_OUTPUT 3 MAIN_SRC_DIR)
+
+ set(LLVM_BINARY_DIR ${BINARY_DIR} CACHE PATH "Path to LLVM build tree")
+ set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
+ set(LLVM_LIBRARY_DIR ${LIBRARY_DIR} CACHE PATH "Path to llvm/lib")
+ set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
# Make use of LLVM CMake modules.
file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24005.71040.patch
Type: text/x-patch
Size: 1152 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160912/5ae5a1be/attachment.bin>
More information about the cfe-commits
mailing list