From 1efadf976dafede4626f152f30322e24ef72eaf9 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Wed, 12 Aug 2015 06:36:19 +0000 Subject: [PATCH] Fix CMake error whet llvm-config reports a non-existent source directory. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@244717 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/Modules/HandleOutOfTreeLLVM.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/HandleOutOfTreeLLVM.cmake b/cmake/Modules/HandleOutOfTreeLLVM.cmake index bf629a92..53adb063 100644 --- a/cmake/Modules/HandleOutOfTreeLLVM.cmake +++ b/cmake/Modules/HandleOutOfTreeLLVM.cmake @@ -42,11 +42,15 @@ macro(find_llvm_parts) endif() if (NOT EXISTS ${LLVM_MAIN_SRC_DIR}) - message(FATAL_ERROR "Not found: ${LLVM_MAIN_SRC_DIR}") + set(LLVM_FOUND OFF) + message(WARNING "Not found: ${LLVM_MAIN_SRC_DIR}") + return() endif() if(NOT EXISTS ${LLVM_CMAKE_PATH}) - message(FATAL_ERROR "Not found: ${LLVM_CMAKE_PATH}") + set(LLVM_FOUND OFF) + message(WARNING "Not found: ${LLVM_CMAKE_PATH}") + return() endif() list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")