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.
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)
It looks like that for in tree the lit needs to be like this:
and out of tree like this: