diff options
| author | Ramkumar Ramachandra <artagnon@gmail.com> | 2015-11-10 18:09:14 +0000 |
|---|---|---|
| committer | Ramkumar Ramachandra <artagnon@gmail.com> | 2015-11-10 18:09:14 +0000 |
| commit | f7e934d12a8db0fec802aa6bca156ca8fe355ff7 (patch) | |
| tree | a760668d202ac1d978916b30710ed7ed623e9533 | |
| parent | 0e77d72b0ad39fb31d4a435497bd4610e61c586f (diff) | |
| download | bcm5719-llvm-f7e934d12a8db0fec802aa6bca156ca8fe355ff7.tar.gz bcm5719-llvm-f7e934d12a8db0fec802aa6bca156ca8fe355ff7.zip | |
LLDBStandalone: Report nice errors on missing vars
Differential Revision: http://reviews.llvm.org/D13819
llvm-svn: 252624
| -rw-r--r-- | lldb/cmake/modules/LLDBStandalone.cmake | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/lldb/cmake/modules/LLDBStandalone.cmake b/lldb/cmake/modules/LLDBStandalone.cmake index 035e9f6ee74..d3955f1cdf6 100644 --- a/lldb/cmake/modules/LLDBStandalone.cmake +++ b/lldb/cmake/modules/LLDBStandalone.cmake @@ -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}" |

