CMake on msys generate invalid compiler_depends.make files
When building using cmake in an msys2 install with a compiler built for windows, the paths's generated in the compiler_depends.make is sometimes absolute windows paths. However the cmake combiner seem to assume the paths are going to be unix style paths and create invalid combination of the path.
https://github.com/msys2/MSYS2-packages/discussions/3015
the *.d files contains files on the following form:
rt-kernel-xmc4/arch/CMakeFiles/xmc4.dir/xmc4/eru.o: \
C:/work/platform/src/platform/rt-kernel-xmc4/arch/xmc4/eru.c \
C:/work/platform/src/platform/rt-kernel-xmc4/include/arch/xmc4/eru.h \
The compiler_depend.make ends up with the following:
rt-kernel-xmc4/arch/CMakeFiles/xmc4.dir/xmc4/eru.o: ../rt-kernel-xmc4/arch/xmc4/eru.c \
rt-kernel-xmc4/arch/C:/work/platform/src/platform/rt-kernel-xmc4/arch/xmc4/eru.c \
rt-kernel-xmc4/arch/C:/work/platform/src/platform/rt-kernel-xmc4/include/arch/xmc4/eru.h \
It fails to detect that the original path was an absolute path, and prefixes the path of the object.
My guess is this commit: https://github.com/Kitware/CMake/commit/6a6efdcaedc6f87fbafd40af5305cabdced450c4