LLDBStandalone: Report nice errors on missing vars

Differential Revision: http://reviews.llvm.org/D13819

llvm-svn: 252624
This commit is contained in:
Ramkumar Ramachandra 2015-11-10 18:09:14 +00:00
parent 0e77d72b0a
commit f7e934d12a
1 changed files with 17 additions and 7 deletions

View File

@ -23,6 +23,7 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
else()
get_filename_component(LLVM_MAIN_SRC_DIR ${LLDB_PATH_TO_LLVM_SOURCE}
ABSOLUTE)
set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
list(APPEND CMAKE_MODULE_PATH "${LLVM_MAIN_SRC_DIR}/cmake/modules")
endif()
endif()
@ -30,15 +31,27 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
if (LLDB_PATH_TO_CLANG_SOURCE)
get_filename_component(CLANG_MAIN_SRC_DIR ${LLDB_PATH_TO_CLANG_SOURCE}
ABSOLUTE)
set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
endif()
list(APPEND CMAKE_MODULE_PATH "${LLDB_PATH_TO_LLVM_BUILD}/share/llvm/cmake")
get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
ABSOLUTE)
if (LLDB_PATH_TO_LLVM_BUILD)
get_filename_component(PATH_TO_LLVM_BUILD ${LLDB_PATH_TO_LLVM_BUILD}
ABSOLUTE)
else()
message(FATAL_ERROR "Please set LLDB_PATH_TO_LLVM_BUILD to the root "
"directory of LLVM build or install site.")
endif()
if (LLDB_PATH_TO_CLANG_BUILD)
get_filename_component(PATH_TO_CLANG_BUILD ${LLDB_PATH_TO_CLANG_BUILD}
ABSOLUTE)
else()
message(FATAL_ERROR "Please set LLDB_PATH_TO_CLANG_BUILD to the root "
"directory of Clang build or install site.")
endif()
get_filename_component(PATH_TO_CLANG_BUILD ${LLDB_PATH_TO_CLANG_BUILD}
ABSOLUTE)
# These variables are used by add_llvm_library.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
@ -67,11 +80,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
set(LLVM_MAIN_INCLUDE_DIR "${LLVM_MAIN_SRC_DIR}/include")
set(LLVM_BINARY_DIR ${CMAKE_BINARY_DIR})
set(CLANG_MAIN_INCLUDE_DIR "${CLANG_MAIN_SRC_DIR}/include")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories("${PATH_TO_LLVM_BUILD}/include"
"${LLVM_MAIN_INCLUDE_DIR}"