tstellar created this revision. tstellar added reviewers: mgorny, phosek, Ericson2314. Herald added a project: All. tstellar requested review of this revision. Herald added a project: clang.
This fixes a bug where tests would be disabled when LLVM_EXTERNAL_LIT was set if lit couldn't be found in any of the standard search paths. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D138258 Files: clang/CMakeLists.txt Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -94,10 +94,12 @@ endif() # Seek installed Lit. - find_program(LLVM_LIT - NAMES llvm-lit lit.py lit - PATHS "${LLVM_MAIN_SRC_DIR}/utils/lit" - DOC "Path to lit.py") + if (NOT LLVM_EXTERNAL_LIT) + find_program(LLVM_EXTERNAL_LIT + NAMES llvm-lit lit.py lit + PATHS "${LLVM_MAIN_SRC_DIR}/utils/lit" + DOC "Path to lit.py") + endif() if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py) # Note: path not really used, except for checking if lit was found @@ -119,7 +121,7 @@ endif() endif() - if(LLVM_LIT) + if(LLVM_EXTERNAL_LIT) # Define the default arguments to use with 'lit', and an option for the user # to override. set(LIT_ARGS_DEFAULT "-sv")
Index: clang/CMakeLists.txt =================================================================== --- clang/CMakeLists.txt +++ clang/CMakeLists.txt @@ -94,10 +94,12 @@ endif() # Seek installed Lit. - find_program(LLVM_LIT - NAMES llvm-lit lit.py lit - PATHS "${LLVM_MAIN_SRC_DIR}/utils/lit" - DOC "Path to lit.py") + if (NOT LLVM_EXTERNAL_LIT) + find_program(LLVM_EXTERNAL_LIT + NAMES llvm-lit lit.py lit + PATHS "${LLVM_MAIN_SRC_DIR}/utils/lit" + DOC "Path to lit.py") + endif() if(EXISTS ${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py) # Note: path not really used, except for checking if lit was found @@ -119,7 +121,7 @@ endif() endif() - if(LLVM_LIT) + if(LLVM_EXTERNAL_LIT) # Define the default arguments to use with 'lit', and an option for the user # to override. set(LIT_ARGS_DEFAULT "-sv")
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits