Skip to content

Commit 3370ce5

Browse files
committed
Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directory
llvm-svn: 369312 Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project Cr-Mirrored-Commit: 5a14c1722183bbe3224f8c69b8e189326185522a
1 parent 14987c5 commit 3370ce5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/Modules/HandleOutOfTreeLLVM.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ macro(find_llvm_parts)
99
set(LLVM_PATH ${LLVM_PATH} CACHE PATH "Path to LLVM source tree")
1010
set(LLVM_MAIN_SRC_DIR ${LLVM_PATH})
1111
set(LLVM_CMAKE_PATH "${LLVM_PATH}/cmake/modules")
12+
if (NOT IS_DIRECTORY "${LLVM_PATH}")
13+
message(FATAL_ERROR "The provided LLVM_PATH (${LLVM_PATH}) is not a valid directory")
14+
endif()
1215
elseif(LLVM_CONFIG_PATH)
1316
message(STATUS "Found LLVM_CONFIG_PATH as ${LLVM_CONFIG_PATH}")
1417
set(LIBCXXABI_USING_INSTALLED_LLVM 1)

0 commit comments

Comments
 (0)