# Revision history [back]

[..] the CMake file is not "machine readable". It can contain arbitrary logic in CMake and can't be read without interpreting the CMake code. The XML on the other hand can easily be read.

Longer answer: see CMakeLists.txt vs package.xml.

Just a note: that is only required to make sure code generation for message and service definitions is run before any of the files that include those get compiled (you need to 'help' CMake a bit to understand the dependency hierarchy there). In general: no code generation to depend on, no need for add_dependencies(..).