Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save yuzhangbit/d3a19e07c282b803aceb31ed07576808 to your computer and use it in GitHub Desktop.

Select an option

Save yuzhangbit/d3a19e07c282b803aceb31ed07576808 to your computer and use it in GitHub Desktop.
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what Modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book Large-Scale C++ Software Design by John Lakos. The next video that goes more into the details of Modern CMake is Daniel Pfeifer’s C++Now 2017 talk Effective CMake (slides).

This text is heavily influenced by Mathieu Ropert’s and Daniel Pfeifer’s talks.

If you are interested in the history and internal architecture of CMake, have a look at the article CMake in the book The Architecture of Open Source Applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment