I am currently looking at replacements for the old make system for some projects. One of the alternatives I am currently looking at is cmake. However from what I know so far, CMake prefers to have one configuration file for each directory, similar to what Autotools and others prefer as well.
I know that recursive make should be considered harmfull, because not the whole dependency graph is know at all times (see the paper for details). For that reason other tools, which rely on recursive make, either do not work correctly in all cases or need some wrappers to work around these problems.
I am currently trying to figure out how CMake handles this case, and if the issues mentioned in the paper were taken into account in the design. I will try out the examples mentioned in the paper, but in case they work, it will not give me a certainty, that recursive builds work in all cases.
So the main question is: Was this issue taken into consideration for CMake or not? If so where can I read anything about their solution.
EDIT:
I found the CMake FAQ entry on this issue, but I am not really satisfied by the answer. I guess the real answer is in there somewhere, but I cannot find it, because I have no knowledge so far of CMake internals and I am not planning on learning them, if I might decide beforehand, that it is not the right tool for my purposes.
CMake does not generate one makefile per
CMakeLists.txt. It collects all information from all of them and than creates something, that is unbelievably complex, but presumably written that way exactly so that it’s reliable and ensures files are rebuilt if the relevantCMakeLists.txtchanges.