Fix individual check tests with lit when building out-of-tree
check-flang-<folder> was not working.
The CMakeLists.txt was looking for the lit tests in the source directory
instead of the build directory.
Details
Details
- Reviewers
DavidTruby sscalpone sameeranjoshi tskeith
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I applied this to the current LLVM head (81bf1e29aa) and got this cmake error (and more) when doing an in-tree build:
CMake Error at /Users/tsk/llvm/llvm2/llvm/cmake/modules/AddLLVM.cmake:1717 (add_custom_target): The target name "check-flang-evaluate-%flang" is reserved or not valid for certain CMake features, such as generator expressions, and may result in undefined behavior. Call Stack (most recent call first): /Users/tsk/llvm/llvm2/llvm/cmake/modules/AddLLVM.cmake:1781 (add_lit_target) /Users/tsk/llvm/llvm2/flang/test/CMakeLists.txt:35 (add_lit_testsuites)
Comment Actions
It looks like that for in tree the lit needs to be like this:
add_lit_testsuites(FLANG ${CMAKE_CURRENT_SOURCE_DIR}
and out of tree like this:
add_lit_testsuites(FLANG ${CMAKE_CURRENT_BINARY_DIR}
Comment Actions
I have created another revision, as I tried updating the current revision but couldn't.
https://reviews.llvm.org/D82120
@CarolineConcatto thanks for pointing the issue and working on it.