CMake builds Debug configuration on MSVC when specifying --parallel
When using CMake >= 3.19.8, specifying --parallel
seems to ignore the --config
option provided to cmake
when using MSVC build files.
mkdir build
cd build
cmake ..
cmake --build . --parallel --config Release # Not respected, Debug is build instead
If instead, cmake --build . --config Release
is used, it does properly build the Release configuration. Moreover, when using cmake --install .
afterwards, this tries to install the Release configuration, which fails because the Debug configuration was built instead. Perhaps there is some relation with issue #21984 here.
This was noted in the context of building a specific package, igraph
, see the open issue here.