[PATCH] D23742: cmake: Use system llvm-lit when lit.py does not exist in srcdir
Michał Górny via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 20 04:49:30 PDT 2016
mgorny created this revision.
mgorny added reviewers: garious, chapuni.
mgorny added a subscriber: llvm-commits.
Modify the add_lit_target function to use lit.py from LLVM_MAIN_SRC_DIR only when one does exist there, and otherwise fall back to looking for system install of llvm-lit. This is based on a similar conditional in clang's CMakeLists.txt, and makes it possible to run clang's tests when built separately from LLVM with no access to the original sources.
https://reviews.llvm.org/D23742
Files:
cmake/modules/AddLLVM.cmake
Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -1076,7 +1076,7 @@
if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
endif ()
- if (LLVM_MAIN_SRC_DIR)
+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
else()
find_program(LIT_COMMAND llvm-lit)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23742.68773.patch
Type: text/x-patch
Size: 519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160820/3c8612f1/attachment.bin>
More information about the llvm-commits
mailing list