[PATCH] Allow external projects to run tests via llvm-lit
Greg Fitzgerald
gregf at codeaurora.org
Tue May 20 17:42:13 PDT 2014
test if variable is set instead of testing if directory exists
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 (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.9648.patch
Type: text/x-patch
Size: 726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140521/d8feef40/attachment.bin>
More information about the llvm-commits
mailing list