Ninja: Backslashes on Windows incompatible with Embedded-GCC-compiler, can't reformat to forwardslash
I have to use a certain kind of compiler (Hightec tricore GCC) for this project. I'm building on Windows 10 with Cmake 3.17.2(0032601-MSVC_2) and Ninja 1.10.0.
There's a bug in the compiler's handling of response-files where it does not escape \ in paths properly.
-I..\..\platforms\win_tricore-gcc\include
ends up as:
ignoring nonexistent directory "....platformswin_tricore-gccinclude"
(only when using response files, standard command line works)
There are 2 things I tried to work around the bug:
- disable response files -> for some reason CMake ignores my
CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS
andCMAKE_NINJA_FORCE_RESPONSE_FILE
being set to 0 when using ninja, it just always uses response files. (only recently, not sure what changed) - replace \ with / in paths that are passed as parameters (through response file) -> for compile options that can be done with REGEX REPLACE, but no idea how to do that with include-paths as they are dynamically generated by CMake.
Is there any way to switch from \
to /
on windows?
Is there any mechanism to edit response files before use?