[libcxx-commits] [libcxxabi] r369312 - Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directory

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Aug 19 16:51:27 PDT 2019


Author: ldionne
Date: Mon Aug 19 16:51:26 2019
New Revision: 369312

URL: http://llvm.org/viewvc/llvm-project?rev=369312&view=rev
Log:
Provide a meaningful diagnostic when LLVM_PATH doesn't point to a directory

Modified:
    libcxxabi/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake

Modified: libcxxabi/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake?rev=369312&r1=369311&r2=369312&view=diff
==============================================================================
--- libcxxabi/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake (original)
+++ libcxxabi/trunk/cmake/Modules/HandleOutOfTreeLLVM.cmake Mon Aug 19 16:51:26 2019
@@ -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)




More information about the libcxx-commits mailing list