[PATCH] D58204: CMake: Fix stand-alone clang builds since r353268
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 13 16:14:59 PST 2019
tstellar updated this revision to Diff 186769.
tstellar added a comment.
Updated patch to fix non-standalone builds. There is more refactoring
that could be done, but this at least restores functionality to before
r353268.
I have tested non-standalone builds and standalone builds with and
without llvm-config.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58204/new/
https://reviews.llvm.org/D58204
Files:
clang/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
Index: llvm/cmake/modules/AddLLVM.cmake
===================================================================
--- llvm/cmake/modules/AddLLVM.cmake
+++ llvm/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
Index: clang/CMakeLists.txt
===================================================================
--- clang/CMakeLists.txt
+++ clang/CMakeLists.txt
@@ -75,6 +75,11 @@
set(LIBRARY_DIR ${LLVM_LIBRARY_DIR})
set(INCLUDE_DIR ${LLVM_INCLUDE_DIR})
set(LLVM_OBJ_DIR ${LLVM_BINARY_DIR})
+ # The LLVM_CMAKE_PATH variable is set when doing non-standalone builds and
+ # used in this project, so we need to make sure we set this value.
+ # FIXME: LLVM_CMAKE_DIR comes from LLVMConfig.cmake. We should rename
+ # LLVM_CMAKE_PATH to LLVM_CMAKE_DIR throughout the project.
+ set(LLVM_CMAKE_PATH ${LLVM_CMAKE_DIR})
endif()
set(LLVM_TOOLS_BINARY_DIR ${TOOLS_BINARY_DIR} CACHE PATH "Path to llvm/bin")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58204.186769.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190214/cb6c6e5d/attachment.bin>
More information about the cfe-commits
mailing list