Skip to content

cmake: Allow setting default generator by environment variable

Eicke Herbertz requested to merge wolle/cmake:default-generator-env into master

This allows setting a custom default generator in an environment variable CMAKE_GENERATOR, as well as the CMAKE_GENERATOR_(INSTANCE|PLATFORM|TOOLSET) variables.

If a CMake cache is present, the cached generator is used. If no environment variable and no cache is present, the CMake default generator is used.

I couldn't find any reason for this feature to don't exist. It's convenient.

Edited by Eicke Herbertz

Merge request reports