aboutsummaryrefslogtreecommitdiff
path: root/clang/CMakeLists.txt
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2017-11-17 22:21:23 +0000
committerMichal Gorny <mgorny@gentoo.org>2017-11-17 22:21:23 +0000
commitba996aba01192f4b102f303dccb34111b9be343d (patch)
tree11742505405c3b5c94da3a917abf6938366fb6a7 /clang/CMakeLists.txt
parentceec175dff8e38b7bade415323e81c86ee2925e4 (diff)
[cmake] Use llvm-lit directory when provided for stand-alone build
After the recent lit test changes, clang attempts to run its tests via llvm-lit by default. However, the llvm-lit binary is not present when performing stand-alone build resulting in a failure out of the box. To solve that, add the llvm-lit directory to CMake when performing a stand-alone build and LLVM sources are provided. This includes the CMake rules generating the llvm-lit binary and effectively makes it possible for clang to use it. Differential Revision: https://reviews.llvm.org/D40142 llvm-svn: 318562
Diffstat (limited to 'clang/CMakeLists.txt')
-rw-r--r--clang/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index b5a245d0389f..a60d11793a50 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -132,6 +132,9 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
# Note: path not really used, except for checking if lit was found
set(LLVM_LIT ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py)
+ if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/llvm-lit)
+ add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit utils/llvm-lit)
+ endif()
if(NOT LLVM_UTILS_PROVIDED)
add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/FileCheck utils/FileCheck)
add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/count utils/count)