MS VS 2022 builds "Debug" instead of "Release"
For the test, the source code of zlib was used.
d:\dev\zlib-1.2.13>cmake --version
cmake version 3.26.0-rc2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
d:\dev\zlib-1.2.13>cmake -G "Visual Studio 17 2022" -A x64 --build .
CMake Error: Unknown argument --build
CMake Error: Run 'cmake --help' for all supported options.
Why?
set CMAKE_BUILD_TYPE=Release
set "CMAKE_GENERATOR=Visual Studio 17 2022"
set CMAKE_GENERATOR_PLATFORM=x64
d:\dev\zlib-1.2.13>cmake --fresh . && cmake --build .
MSBuild version 17.4.1+9a89d02ff for .NET Framework
zlib.vcxproj -> D:\dev\zlib-1.2.13\Debug\zlibd.dll
example.vcxproj -> D:\dev\zlib-1.2.13\Debug\example.exe
minigzip.vcxproj -> D:\dev\zlib-1.2.13\Debug\minigzip.exe
zlibstatic.vcxproj -> D:\dev\zlib-1.2.13\Debug\zlibstaticd.lib
"Debug" instead of "Release"