diff options
author | Louis Dionne <ldionne@apple.com> | 2019-08-19 23:51:26 +0000 |
---|---|---|
committer | Louis Dionne <ldionne@apple.com> | 2019-08-19 23:51:26 +0000 |
commit | 5a14c1722183bbe3224f8c69b8e189326185522a (patch) | |
tree | 27aa1599b43ef3aee7777884959a4e3573f750d2 /libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake | |
parent | 9f985dd380a3be782a0f483b8684f064762919b1 (diff) | |
download | bcm5719-llvm-5a14c1722183bbe3224f8c69b8e189326185522a.tar.gz bcm5719-llvm-5a14c1722183bbe3224f8c69b8e189326185522a.zip |
Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directory
llvm-svn: 369312
Diffstat (limited to 'libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake')
-rw-r--r-- | libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake index 11c13315585..5746afb5eb3 100644 --- a/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ b/libcxx/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -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) |