[CMake] How to change/set default generator
cmake.org › pipermail › cmakeDec 10, 2008 · Line 2009 of CMake/Source/cmake.cxx chooses the default Visual Studio generator. Looks like that block of code forgot to update itself when Visual Studio 9 support was added. We should, of course, prefer the most recent VS available as the default. I will add some code to CVS CMake to do this, but I may not get to it for a few days.
CMAKE_GENERATOR — CMake 3.23.0-rc1 Documentation
cmake.org › latest › envvarSpecifies the CMake default generator to use when no generator is supplied with -G. If the provided value doesn't name a generator known by CMake, the internal default is used. Either way the resulting generator selection is stored in the CMAKE_GENERATOR variable. Some generators may be additionally configured using the environment variables: