From Get docs
Cmake/docs/3.21/envvar/cmake generator


New in version 3.15.

This is a CMake Environment Variable. Its initial value is taken from the calling process environment.

Specifies 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:

© 2000–2021 Kitware, Inc. and Contributors
Licensed under the BSD 3-clause License.