For many developers CMake is not so intuitive, eg. because of the syntax. Others are able to see CMake documentation, but miss good practical examples. After more than 10 years of experience in programming and leading many CMake workshops I was ready to prepare multiplatform friendly course for beginners in CMake world and also for people that has experience in CMake that will help to solve that problems.
There is many tutorials and blog posts, so why this training? In this training I put not only theory that you can find in the popular websites, but firstly I present:
For many developers CMake is not so intuitive, eg. because of the syntax. Others are able to see CMake documentation, but miss good practical examples. After more than 10 years of experience in programming and leading many CMake workshops I was ready to prepare multiplatform friendly course for beginners in CMake world and also for people that has experience in CMake that will help to solve that problems.
There is many tutorials and blog posts, so why this training? In this training I put not only theory that you can find in the popular websites, but firstly I present:
good practices from first lecture
how to avoid making simple but hard to find mistakes
advantages and disadvantages of many solutions
This training is the first part of series "Effective Modern CMake".
In this training I try to avoid the command line that is usually good, but platform dependent, so never mind if you are using Windows, Linux or macOS. This training is for you. Moreover I show differences and in some topics dedicated solutions for each platform if it is needed. I prepared videos that help you setup environment in the most popular code editors like CLion, Visual Studio and Qt Creator. Of course you can use your favorite IDE.
Would you like to have an example of given topic, eg. integrating with C++ library? Put a comment and collect the vote.
In this lecture I explain how important is understanding cmake_minimum_required() function for project. I also present other functions that should be place in CMake project. Off course having "Hello World" message in first project is compulsory!
In this lecture I present how to declare variable and modify variables values. Off course CMake is CMake, so using variables cannot be too easy. I present also some traps that CMake syntax has for us and how to avoid bugprone situations.
This lecture is short, but it should be, because creating executable in CMake is very easy.
It is not enought to use target base approach over variable based approach. The power of Modern CMake starts to be visible when we introduce good build system structure. In this lecture I explain how to connect targets and add CMake subprojects to have well organized, flexible and effective CMake build system.
Conditions topic seems to be easy for every developer that has some experience in programing, but CMake again have a slightly different approach than standard programming languages. Understanding CMake conditions syntax is very important to be able to read the code and find root causes of some bugs.
In this lecture I show a way how we can pass values from CMake build system to source code (eg. C++, C).
When we have multiplatform project and we use shared libraries MSVC (Microsoft Visual Compiler) requires from us to add some changes to source files and build system. In this lecture I show the most optimal solution by using CMake mechanisms that we already know.
CMake Cache is a good mechanism, but there is some traps that wait for developers that are not aware about few things. In this lecture I explain how to use CMake Cache well and show good practices.
The tests are very important part of build system. In this lecture I show another advantage of the modern CMake project structure: adding test applications is very easy.
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.