Sadly, I realized that CMAKE_<LANG>_SIMULATE_ID
is not really helpful.
Whether I use clang
or clang-cl
it always evaluates to MSVC
.
CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
on the other hand only evaluates to MSVC
if using clang-cl
and to GNU
for clang
.
So what I really need to pass options to Clang with the correct format is CMAKE_<LANG>_COMPILER_FRONTEND_VARIANT
.
Is there any reason, why that variable is supposed to be a CMake-internal one?
I would suggest to officially expose it to users and to provide proper documentation to both variables, because the documentation for CMAKE_<LANG>_SIMULATE_ID
seems not to reflect what that variable really shows. (It seems more as if CMAKE_<LANG>_SIMULATE_ID
determines if I am calling Clang from a Visual Studio prompt but not in what driver-mode it is running.)