Copy variable LLVM_BUILD_MAIN_SRC_DIR from LLVMConfig.cmake to
LLVM_MAIN_SRC_DIR as it is named for in-tree builds. This ensures that
add_lit_target() can reliably find llvm-lit which is not necessarily
in the PATH.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LLVMConfig.cmake does have LLVM_BUILD_MAIN_SRC_DIR which is set to the value of LLVM_MAIN_SRC_DIR, so we should instead just do set(LLVM_MAIN_SRC_DIR ${LLVM_BUILD_MAIN_SRC_DIR}) around line 60 where we map up the other variables that don't match between in-tree builds and LLVMConfig.cmake.