What is the difference between CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE?
The document claims they are dinstinguished by multi-config or single-config, what does it mean?
What is the difference between CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE?
The document claims they are dinstinguished by multi-config or single-config, what does it mean?
CMake is a generator of a build system (yeah, it doesn't build anything by itself).
Some generators are single-configuration (e.g., Unix Makefiles or Ninja). This means that you specify a building type (via -DCMAKE_BUILD_TYPE=XXX) and cmake --build . will build only this type (e.g. Debug, Release, ...) from the generated build directory.
The others are multi-config generators (e.g., Visual Studio NN YYYY or Ninja Multi-Config) -- i.e., you provide a set of configurations (via -DCMAKE_CONFIGURATION_TYPES=Debug;Release) and the generated build system can build any (or all) of the list out of the single build directory (via cmake --build . --config <name>).
So, generally, single-configuration generators (not all of them) check the CMAKE_BUILD_TYPE variable for the desired configuration type. Whereas the multi-configuration generators look for the list of desired configurations in the CMAKE_CONFIGURATION_TYPES.
Except for these (two) variables a generator may check some other variables in order to "tune" smth. Better to read the documentation of the particular generator for the details.