Remove hard-coded language limits which makes 4 classes of generator expressions inoperable for externally supported languages
Preliminary discussion of this issue occurred at https://www.mail-archive.com/cmake-developers@cmake.org/msg19100.html where it was noted that the generator expression $<D_COMPILER_ID:compiler_ids> did not work because of hard-coded limits on which languages are supported for generator expressions that include a language in their name. Therefore the issue occurs for the first and also very likely (but untested) the last three of the four following classes of generator expressions:
$<"language"_COMPILER_ID:compiler_ids>
$<"language"_COMPILER_VERSION:version>
$<"language"_COMPILER_ID>
$<"language"_COMPILER_VERSION>
where "language" is one of the externally supported CMake languages such as D or Ada (but there are likely additional languages beyond those two that I am aware of that are externally supported). I am not that familiar with CMake code, but from the preliminary discussion I assume that each of the above classes of generator expression currently have 6 different implementations corresponding to the internally supported languages
* C_COMPILER_ID
* CXX_COMPILER_ID
* CUDA_COMPILER_ID
* Fortran_COMPILER_ID
* OBJC_COMPILER_ID (new in 3.16)
* OBJCXX_COMPILER_ID (new in 3.16)
and I suggest the fix should be to have a single implementation for each of the above four classes of generator expressions, where "language" is determined from the first part of the name of the generator expression specified by the user. This suggested approach has the following benefits:
- Allows externally supported languages such as D and Ada to use the above four classes of generator expressions (and thus fixes the present bug).
- Consolidates 6 (and growing) implementations of the above genex classes into one implementation for each class.
- Allows consolidating the 6 (and growing) documentation items for the above 4 classes of genex into one documentation item for each class.
- Reduces the steps necessary to add internally supported languages.