VS: Handle compiler path error due to compiler upgrade
After an update to VS2022 that includes a compiler upgrade, I will get an error like this when I try to generate a CMake project to an existing binary folder:
The CMAKE_CXX_COMPILER:
C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe
is not a full path to an existing compiler tool.
I think it would be helpful to handle this situation automatically. Before failing, maybe it could clear the cache and try again? Or, if that's too heavy-handed, maybe the error message could simply suggest using the --fresh
command line option or the Delete Cache feature in the CMake GUI?
Edited by Steve Robinson