Here's a simple CMakeLists.txt that demonstrates the problem:
project("My project does not use C" CXX) set(LLVM_DIR "${LLVM_obj-root}/lib/cmake/llvm") find_package(LLVM REQUIRED CONFIG)
Test with:
cmake . -DLLVM_obj-root=`llvm-config --obj-root`
Without the patch to FindTerminfo.cmake CMake v3.16.3 will fail with:
Unknown extension ".c" for file ... try_compile() works only for enabled languages.