INTERFACE_LANGUAGE for consuming CUDA headers from C++
In our applications where libraries are "sometimes CUDA" depending on the configuration, we've come up with a possible improvement to CMake: an
INTERFACE_LANGUAGE property for a library target that defines the kind of language needed to use headers from that library. For example, you might have a library that has C++ in its implementation but has a pure C API. Or you might have a library whose headers are written in C++. Or in our case, you might have a library (A) whose headers sometimes are C++ and sometimes are CUDA, which are used by other libraries (B) that only have C++ code in them. When library (A) has CUDA language headers, then library (B) could automatically be compiled as CUDA language code.
Not sure this is good enough to really happen in CMake, but hopefully through this issue we can get feedback on the validity of the idea.