Use DEPFILE for ninja generators
This is mostly a note for the future. Cmake just added depfile support for add_custom_command and the ninja generator. Hopefully this can be used instead of IMPLICIT_DEPENDS to calculate the dependencies for a PCH when ninja is used instead of make.
https://gitlab.kitware.com/cmake/cmake/merge_requests/66
I fixed it in https://github.com/mkorotetsky/cotire/commit/6c29343d0b4bc67e564ecd8fe287b229032d13b0 Fix was written to work with ndk-r11c, clang and ninja under windows os. I had to base my code on old commit because recent repo changes have issue #146
Worked for me after replacing -MMD with -MD and not adding DEPFILE property for the Unix Makefiles, i.e.
if (${CMAKE_GENERATOR} STREQUAL "Ninja")
add_custom_command with DEPFILE
else ()
add_custom_command without DEPFILE
endif ()