Wrong dependency with Ninja (but OK with Unix Makefiles)
Attached is a minimal replication of the problem. Building the "generator" target should not try to build the "cmake_test" target first. A Unix Makefile works OK, but when using cmake with -G "Ninja", trying to build the generator will fail because it first tries to compile the "cmake_test" target. cmake_ninja_test.tar.bz2