Skip to content

Ninja Multi-Config: Read configuration variables as normal variables

Early versions of the Ninja Multi-Config generator required CMAKE_CONFIGURATION_TYPES and friends to be cache variables in order to support selecting the default config in cmake(1) --build. The behavior of cmake(1) --build has since been updated to no longer require this, and requiring these variables to be cache variables is inconsistent with the other generators.

Read the variables as normal CMake variables like the other generators. This does not require a policy, since the only scenario where this would cause a breakage is one where the cache variable and the CMake variable are explicitly set to different values, which doesn't make sense to do anyway.

Merge request reports