Hello,
I am using ninja (via cmake) for a cross compiler. Currently I have the problem, that even if nothing has changed, a re-build is done for the complete project.
I suspect a problem with the dependency file format that is somehow created by the cross-compiler, but probably can not be properly interpreted by ninja.
The execution of ninja -t deps with the .ninja_deps file produces the following example output:
CMakeFiles/Core0.elf.dir/Module_A/File_A.c.obj: #deps 74, deps mtime 529581474 (VALID)
C:/PROJECTS/repos/000_swprj/Sources/Module_A/File_A.c
C:/PROJECTS/repos/000_swprj/Sources/Module_A/File_A.c
File_A.o
C:/PROJECTS/repos/000_swprj/Sources/Module_A/Header_A.h
C:/PROJECTS/repos/000_swprj/Sources/Module_A/Header_A.h
File_A.o
C:/PROJECTS/repos/000_swprj/Sources/Module_A/Header_y.h
C:/PROJECTS/repos/000_swprj/Sources/Module_A/Header_y.h
... etc ...
CMakeFiles/Core0.elf.dir/Module_A/File_B.c.obj: #deps 140, deps mtime 529581475 (VALID)
C:/PROJECTS/repos/000_swprj/Sources/Module_A/File_B.c
C:/PROJECTS/repos/000_swprj/Sources/Module_A/File_B.c
File_B.o
C:/PROJECTS/repos/000_swprj/Sources/Module_A/Header_B.h
... etc ...
As you can see, the object file extension differs and each dependency file is listed twice...
Has somebody an explanation, why ninja triggers always the complete build? Or at least can tell me, how the dependency output should look like?
BTW: I called ninja with -d keepdepfile, but the original dep-file, created by the compiler is not there....
Thanks in advance!!!
Harald