Missing documentation for CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
Note: I was already discussing this on CMake's discourse.
On Windows it is useful to know if one is using clang
or clang-cl
, in order to pass compiler-options in the correct format. (clang
expects similar options as GCC, while clang-cl
expects the same options as MSVC.)
I became aware of CMAKE_<LANG>_SIMULATE_ID
and CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
.
Sadly, the former is not really helpful here as it always evaluates to "MSVC"
while at least the latter only evaluates to "MSVC"
for clang-cl
and to "GNU"
for clang
.
However, I am unsure if I should rely on CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
because there is no official documentation for it and it even seems to be unclear whether it is a CMake-internal variable or not.
I therefore suggest to make CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
an official / non-CMake-internal variable by documenting it.
Likewise, I would suggest to extend the documentation of CMAKE_<LANG>_SIMULATE_ID
to better document its purpose and what its value really means.