Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: fixing toolchain_parse_make_rule to correctly handle
\
files
Fixes: zephyrproject-rtos#37637 toolchain_parse_make_rule() parses depfiles and converted `\\` to the CMake list separator `;`. However, gcc -M might create depfiles with windows path separator `\` causing this conversion to fail, as a path like: c:\...\zephyr\samples\drivers\led_ws2812\nrf52-bindings.h resulting in a file list as: c:;...;zephyr;samples;drivers;led_ws2812;nrf52-bindings.h which results in a CMake configure dependency to be added to `C:`. As C: is always newer than the build.ninja file, this resulted in continues CMake re-invocation. As a small side-note, the `\` in file name did only occur in situations where a relative past had been used elsewhere in the build system, such as here: https://github.com/zephyrproject-rtos/zephyr/blob/\ c3050a5/samples/drivers/led_ws2812/\ boards/nrf52dk_nrf52832.overlay#L9 To ensure proper handling of files, then all files are converted to CMake paths, that is with forward slashes: `/` Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
- Loading branch information