Skip to content

Commit

Permalink
Provide a meaningful diagnostic when LLVM_PATH doesn't point to a dir…
Browse files Browse the repository at this point in the history
…ectory

llvm-svn: 369312
  • Loading branch information
ldionne committed Aug 19, 2019
1 parent 9f985dd commit 5a14c17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ macro(find_llvm_parts)
set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source tree")
set(LLVM_MAIN_SRC_DIR ${LLVM_PATH})
set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules")
if (NOT IS_DIRECTORY "${LLVM_PATH}")
message(FATAL_ERROR "The provided LLVM_PATH (${LLVM_PATH}) is not a valid directory")
endif()
elseif(LLVM_CONFIG_PATH)
message(STATUS "Found LLVM_CONFIG_PATH as ${LLVM_CONFIG_PATH}")
set(LIBCXX_USING_INSTALLED_LLVM 1)
Expand Down
3 changes: 3 additions & 0 deletions libcxxabi/cmake/Modules/HandleOutOfTreeLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ macro(find_llvm_parts)
set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source tree")
set(LLVM_MAIN_SRC_DIR ${LLVM_PATH})
set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules")
if (NOT IS_DIRECTORY "${LLVM_PATH}")
message(FATAL_ERROR "The provided LLVM_PATH (${LLVM_PATH}) is not a valid directory")
endif()
elseif(LLVM_CONFIG_PATH)
message(STATUS "Found LLVM_CONFIG_PATH as ${LLVM_CONFIG_PATH}")
set(LIBCXXABI_USING_INSTALLED_LLVM 1)
Expand Down

0 comments on commit 5a14c17

Please sign in to comment.