[PATCH] Allow external projects to run tests via llvm-lit

Greg Fitzgerald garious at gmail.com
Mon Apr 28 15:04:19 PDT 2014


This version uses the lit.py in the llvm source directory unless it is unavailable.

http://reviews.llvm.org/D3429

Files:
  cmake/modules/AddLLVM.cmake

Index: cmake/modules/AddLLVM.cmake
===================================================================
--- cmake/modules/AddLLVM.cmake
+++ cmake/modules/AddLLVM.cmake
@@ -632,11 +632,12 @@
   if (NOT CMAKE_CFG_INTDIR STREQUAL ".")
     list(APPEND LIT_ARGS --param build_mode=${CMAKE_CFG_INTDIR})
   endif ()
-  set(LIT_COMMAND
-    ${PYTHON_EXECUTABLE}
-    ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py
-    ${LIT_ARGS}
-    )
+  if (EXISTS ${LLVM_MAIN_SRC_DIR})
+    set (LIT_COMMAND ${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+  else()
+    find_program(LIT_COMMAND llvm-lit)
+  endif ()
+  list(APPEND LIT_COMMAND ${LIT_ARGS})
   foreach(param ${ARG_PARAMS})
     list(APPEND LIT_COMMAND --param ${param})
   endforeach()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3429.8898.patch
Type: text/x-patch
Size: 736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140428/f4adcea0/attachment.bin>


More information about the llvm-commits mailing list