Modern CMake for C++

Learn how to use CMake in C++ projects for building, testing, packaging automation, optimizing compilation, and choosing the right tools for efficient project setup.

Beginner

120 Lessons

37h

Certificate of Completion

Learn how to use CMake in C++ projects for building, testing, packaging automation, optimizing compilation, and choosing the right tools for efficient project setup.

AI-POWERED

Explanations

AI-POWERED

Explanations

This course includes

1 Assessment
88 Playgrounds
11 Quizzes

This course includes

1 Assessment
88 Playgrounds
11 Quizzes

Course Overview

Creating production-ready software is not a trivial task. A common issue developers face is the lack of coherent guidelines to build effective and elegant solutions. This course provides learners an end-to-end hands-on experience in building C++ solutions in a comprehensive manner. You’ll start with the processes to use CMake in your projects. Next, you’ll learn about the automation of complex tasks including building, testing, and packaging. Then, you’ll learn how to form source directories, as well as bu...Show More

What You'll Learn

A deep understanding of the steps involved in the software build process

Working knowledge of the automation process of complex tasks in the building project

Familiarity with the different options available to build software

Hands-on exposure to navigating through the project structure, scripts, and modules to build maintainable and clean solutions

Hands-on practice with different CMake tools to configure, run, and generate test results

Hands-on experience in applying the end-to-end CMake process to build, test, and package C++ projects

What You'll Learn

A deep understanding of the steps involved in the software build process

Show more

Course Content

1.

Introduction to the Course

Get familiar with building and managing elegant, maintainable C++ projects using CMake.
2.

First Steps with CMake

Look at transforming C++ source code into executables using CMake's automated build process.
3.

The CMake Language

Work your way through essential CMake syntax, variable management, control structures, and useful commands.
4.

Setting Up Our First CMake Project

Find out about setting up and optimizing your first CMake project with structured guidance.
5.

Working with Targets

Deepen your knowledge of managing targets, properties, dependencies, and generator expressions in CMake.
6.

Compiling C++ Sources with CMake

9 Lessons

Investigate the complexities of C++ compilation, preprocessor and optimizer configurations, and efficient build management.
7.

Linking with CMake

8 Lessons

Master linking in CMake, understanding files, libraries, symbol management, and testing techniques.

Modern CMake for C++ Exam 1

Assessment

8.

Managing Dependencies with CMake

10 Lessons

Learn how to use CMake for managing external dependencies efficiently in C++ projects.
9.

Testing Frameworks

10 Lessons

Unpack the core of automated testing, CTest integration, and using Catch2 and GTest in C++.
10.

Program Analysis Tools

7 Lessons

Work your way through program analysis tools for formatting, static checking, and dynamic analysis.
11.

Generating Documentation

4 Lessons

Grasp the fundamentals of generating clear, modern documentation using Doxygen in CMake projects.
12.

Installing and Packaging

13 Lessons

Generate and manage C++ project installations and packages effectively using CMake and CPack.
13.

Creating Our Professional Project

9 Lessons

Tackle structuring, building, and managing dependencies for a professional CMake project.
14.

Conclusion

1 Lesson

Master the steps to build, manage, and automate professional C++ projects using CMake.
15.

Appendix

6 Lessons

Learn how to use essential CMake commands for installation, string, list, file, and math operations.

Course Author

Trusted by 1.4 million developers working at companies

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Evan Dunbar

ML Engineer

Carlos Matias La Borde

Software Developer

Souvik Kundu

Front-end Developer

Vinay Krishnaiah

Software Developer

Eric Downs

Musician/Entrepeneur

Kenan Eyvazov

DevOps Engineer

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Hands-on Learning Powered by AI

See how Educative uses AI to make your learning more immersive than ever before.

Instant Code Feedback

Evaluate and debug your code with the click of a button. Get real-time feedback on test cases, including time and space complexity of your solutions.

AI-Powered Mock Interviews

Adaptive Learning

Explain with AI

AI Code Mentor