[llvm] [flang-rt] fix missing llvm_gtest target (PR #67936)

Matheus Izvekov via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 1 15:50:38 PDT 2023


mizvekov wrote:

Isn't this just a question of gating your unittests so they are enabled only when `LLVM_INCLUDE_TESTS` is true?

Because in that case, the main llvm CMakeLists.txt will already make gtest available.

I think there is a lot of inconsistency here in the LLVM codebase regarding this.

Most places are making it a hard requirement, which seems to be the most consistent way with how this is implemented in the main CMakeLists.txt

Other places like flang and lldb are just creating their own tests enabled cache variable, and just taking it's default value from `LLVM_INCLUDE_TESTS`, which seems not correct but will at least work most of the times.

`flang-rt` seemed to not even be looking at `LLVM_INCLUDE_TESTS` at all, which I think is why this is broken.

https://github.com/llvm/llvm-project/pull/67936


More information about the llvm-commits mailing list