From b00e1d8997773f934dfe1f78c9185e3e66110477 Mon Sep 17 00:00:00 2001 From: Michal Gorny Date: Fri, 17 Nov 2017 22:21:23 +0000 Subject: [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 --- clang/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/CMakeLists.txt') diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt index b5a245d0389..a60d11793a5 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) -- cgit v1.2.3