Architecture documentation?

I have dabbled in cmake for years. I can usually get what I need working by googling for examples but I really don’t have any idea how cmake works. I was wondering if there is any document that describes the architecture of cmake and how it works. I see lots of documentation about the details, but I can’t find anything about the basics. Am I missing something?

The best reads, all from the CMake documentation, would probably be…

And, not from the docs:

But beyond that, your best bet is probably reading the source. Whether it’s:

  • the standard modules distributed with CMake (for examples of how to use the CMake language)
  • the C++ source code to learn how various features are implemented behind-the-scenes.

(The modules source can also be found with your installation of CMake, in the Modules directory of the install. They’re found in /usr/share/cmake/Modules/ on most Linux systems, for example.)

I know there are also commercial books written on CMake: There’s @bill.hoffman’s own Mastering CMake, or the recently-published Modern CMake for C++, but I haven’t personally read any of those.

(Edit: Added a few more.)

1 Like