CMake: Fix stand-alone clang builds since r353268
Summary:
Handle the case where LLVM_MAIN_SRC_DIR is not set and also use
LLVM_CMAKE_DIR for locating installed cmake files rather than
LLVM_CMAKE_PATH.
Reviewers: phosek, andrewrk, smeenai
Reviewed By: phosek, andrewrk, smeenai
Subscribers: mgorny, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D58204
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354417 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 95a88af..3432743 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -1718,6 +1718,9 @@
endfunction()
function(find_first_existing_vc_file path out_var)
+ if(NOT EXISTS "${path}")
+ return()
+ endif()
if(EXISTS "${path}/.svn")
set(svn_files
"${path}/.svn/wc.db" # SVN 1.7