FYI, the CMake CMakeDetermineCompilerId.cmake logic for Visual Studio generator needs to successfully build a sample debug project to extract the CMAKE_<LANG>_COMPILER data from the build output. There is a post build step that echoes the compiler that is used to build the project.
In the CMakeError.log output you can see that the build failed because the ‘MSVCRTD.lib’ could not be found.