Modern CMake
Published on: 2025-04-27 07:48:59
An Introduction to Modern CMake#
People love to hate build systems. Just watch the talks from CppCon17 to see examples of developers making the state of build systems the brunt of jokes. This raises the question: Why? Certainly there are no shortage of problems when building. But I think that we have a very good solution to quite a few of those problems. It’s CMake. Not CMake 2.8 though; that was released before C++11 even existed! Nor the horrible examples out there for CMake (even those posted on KitWare’s own tutorials list). I’m talking about Modern CMake. CMake 3.15+, maybe even CMake 4.0+! It’s clean, powerful, and elegant, so you can spend most of your time coding, not adding lines to an unreadable, unmaintainable Make (Or CMake 2) file.
Attention This book is meant to be a living document. You can raise an issue or put in a merge request on GitLab. You can also download a copy as a PDF. Be sure to check the HSF CMake Training, as well!
In short, here are the most likely ques
... Read full article.