On 04/02/2013 11:35 AM, Matthew Woehlke wrote: > Why are the rules set up like this and not such that b.txt depends on A?
A and B are separate CMake logical targets. There is no concept in CMake of a file depending on a logical target. There is no way to express that in the generated VS or Makefile build systems. > I'm not convinced this is a bug It works in all generators except Ninja. Therefore it is at least a bug in CMake's Ninja generator by not finding a way to implement the desired behavior with its native build system. If it is not possible to implement the behavior in Ninja then that is a missing feature. Think of each CMake logical target as its own isolated make process. Evaluation of a dependent target does not even start until after its dependencies have finished. In the example I posted target "B" has no rule to build file "a.txt" so it assumes that the file always exists as if it were a source file. The assumption is valid because target B should not be evaluated until target A is done. We need a way to implement this with Ninja. -Brad -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers