# CMAKE_GENERATOR

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

- `CMAKE_GENERATOR_PLATFORM`

- `CMAKE_GENERATOR_TOOLSET`

- `CMAKE_GENERATOR_INSTANCE`