Ninja: Lots of showInclude logs due to encoding msvc_deps_prefix to utf-8
This original issue was reported in https://github.com/ninja-build/ninja/issues/613
Looks like the regression was introduced in https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5860.
> CMake can detect the prefix correctly, and stores it in its variable 'CMAKE_CL_SHOWINCLUDES_PREFIX' (or CMAKE_CXX_CL_SHOWINCLUDES_PREFIX). Note that this prefix is not utf-8 encoding. For example, in my locale it is encoded in 'GB18030'.
>
> However, when creating rules.ninja, cmake converts this prefix to utf-8 and saves the converted data to msvc_deps_prefix.
>
> During build, msvc_deps_prefix (utf-8 encoding) cannot match MSVC's output (gb18030 enconding, et al), so Ninja reports lots of include files.
I switched to cmake-3.20, which doesn't convert the prefix to utf-8, and everything works well.
issue