[PATCH] D138258: clang/cmake: Fix incorrectly disabling tests when LLVM_EXTERNAL_LIT is used
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 17 21:39:33 PST 2022
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")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138258.476332.patch
Type: text/x-patch
Size: 972 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221118/ebb27ec7/attachment-0001.bin>
More information about the cfe-commits
mailing list