Ninja generator doesn’t work in msys2-built cmake
The problem doesn’t appear with the official binaries.
corresponding issue: https://github.com/Alexpux/MINGW-packages/issues/2462
The Ninja generator uses a codecvt to generate ANSI output.
This codecvt however doesn’t appear to work with mingw-w64 which results in an inability for the generator to produce any files.
codecvt::do_out
always returns std::codecvt::error
when a range of more than 1 char is passed.
Changing this condition to >= 1
seems to fix it.
I’m not sure why it should work the way it currently is at all.