[Lldb-commits] [lldb] r291500 - [cmake] Obtain LLVM_CMAKE_PATH from llvm-config
Michal Gorny via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 9 15:12:37 PST 2017
Author: mgorny
Date: Mon Jan 9 17:12:37 2017
New Revision: 291500
URL: http://llvm.org/viewvc/llvm-project?rev=291500&view=rev
Log:
[cmake] Obtain LLVM_CMAKE_PATH from llvm-config
Use the new --cmakedir option to obtain LLVM_CMAKE_PATH straight from
llvm-config instead of reconstructing it locally.
Modified:
lldb/trunk/cmake/modules/LLDBStandalone.cmake
Modified: lldb/trunk/cmake/modules/LLDBStandalone.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBStandalone.cmake?rev=291500&r1=291499&r2=291500&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBStandalone.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBStandalone.cmake Mon Jan 9 17:12:37 2017
@@ -21,7 +21,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
"--libdir"
"--includedir"
"--prefix"
- "--src-root")
+ "--src-root"
+ "--cmakedir")
execute_process(
COMMAND ${CONFIG_COMMAND}
RESULT_VARIABLE HAD_ERROR
@@ -47,6 +48,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
list(GET CONFIG_OUTPUT 3 INCLUDE_DIR)
list(GET CONFIG_OUTPUT 4 LLVM_OBJ_ROOT)
list(GET CONFIG_OUTPUT 5 MAIN_SRC_DIR)
+ list(GET CONFIG_OUTPUT 6 LLVM_CMAKE_PATH)
if(NOT MSVC_IDE)
set(LLVM_ENABLE_ASSERTIONS ${ENABLE_ASSERTIONS}
@@ -65,7 +67,6 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)
- set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
set(LLVMCONFIG_FILE "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
if(EXISTS ${LLVMCONFIG_FILE})
list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
More information about the lldb-commits
mailing list