[cmake-developers] Ninja: Custom Command file depends don't need to exist before building

Adam Strzelecki ono at java.pl
Tue Jun 17 12:37:29 EDT 2014


This is related to discussion at http://www.cmake.org/Bug/view.php?id=14972 and your commit 539356f12. I am writing it here since you are not following this bug, and maybe somebody else can also elaborate on this subject.

As you can see Brad & me managed to fix some duplicated phony rules issue in Ninja, however still I don't see whole purpose of this commit and making phony rules for all explicit deps in build folder in 04377f1b.

However there is something substantially wrong with 539356f12 (with commit description as this thread subject).

When building in-source it causes ALL source files to have phony rules, which is really bad, since Ninja no longer complain when some source file disappears instead it happily launches compiler with missing file.

What would be proper solution is that source files marked only as SYMBOLIC should be added to "phony" other file should be explicitly set as OUTPUT of some other commands. If they're not either set SYMBOLIC or OUTPUT of other commands it is a fault of CMakeLists.txt maintainer not Ninja generator.

We have moved recently to CMake+Ninja for some main project at our university and this becomes an issue to us.

Best regards,
-- 
Adam


More information about the cmake-developers mailing list