diff options
author | Michal Gorny <mgorny@gentoo.org> | 2017-11-17 22:21:23 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2017-11-17 22:21:23 +0000 |
commit | a845ce51570fb9304936e6819c2974e35a4da248 (patch) | |
tree | 5c49d10d075e60f78f0e1b2ac5737d6dfcc29bc0 /CMakeLists.txt | |
parent | a007e4f0ca08cd94d152364579367f843e27a3e7 (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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b5a245d038..a60d11793a 100644 --- a/CMakeLists.txt +++ b/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) |