[PATCH] Allow users of the llvm install directory to specify a path to lit.
Greg Fitzgerald
garious at gmail.com
Fri Apr 18 10:36:23 PDT 2014
Hi chapuni,
With this patch, the user can either set LLVM_LIT directory or use CMAKE_PREFIX_PATH=<llvm_install_dir> and CMake's find_program will find llvm-lit.
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,15 @@
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 (NOT LLVM_LIT)
+ find_program(LLVM_LIT llvm-lit)
+ endif()
+ if (LLVM_LIT)
+ set (LIT_COMMAND "${LLVM_LIT}")
+ else ()
+ set (LIT_COMMAND "${PYTHON_EXECUTABLE} ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
+ 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.1.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140418/725f838f/attachment.bin>
More information about the llvm-commits
mailing list