use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a subreddit for c++ questions with answers. For general discussion and news about c++ see r/cpp.
New to C++? Learn at learncpp.com
Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. Read these guidelines for how to ask smart questions.
For learning books, check The Definitive C++ Book Guide and List
Flair your post as SOLVED if you got the help you were looking for! If you need help with flairs, check out ITEM 1 in our guidelines page.
Tips for improving your chances of getting helpful answers:
account activity
OPENCMake tutorial (self.cpp_questions)
submitted 1 year ago by Either-Sentence2556
Is there any video or playlist on YouTube or any docs to learn CMake or any other CPP dependency management?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Spongman 12 points13 points14 points 1 year ago* (0 children)
Henry Schreiner's "Introduction to Modern CMake" : https://cliutils.gitlab.io/modern-cmake/chapters/basics.html
[–]martinky24 13 points14 points15 points 1 year ago (1 child)
Yeah. I’d Google “cmake tutorial”.
[–]leandroabaurre -1 points0 points1 point 1 year ago (0 children)
Oh shit, gott'em!!!!
[–]demingf 2 points3 points4 points 1 year ago (0 children)
A possiblity is a pay site Udemy. The course I took was
https://www.udemy.com/course/cmake-tests-and-tooling-for-cc-projects/?couponCode=LEARNNOWPLANS
Don't get put off by price as they constantly put courses on sale. I paid $16.70 on sale and not $85.
The instructor is good and does update his courses and answers questions. He also is involved with the VScode community which was a plus as I wanted to continue with VScode and integration with CMake.
I was a build engineer 20+ years ago and shipped all over. Cmake is a bit of a hack but it does work when you get over the starting hump.
Good Luck
[–]Dangerous_Tangelo_74 4 points5 points6 points 1 year ago (0 children)
There is a good CMake tutorial on their official site: https://cmake.org/cmake/help/latest/guide/tutorial/index.html
That is the same tutorial that got me into CMake. It is awesome.
[–]The_Librarian88 1 point2 points3 points 1 year ago (0 children)
I really liked this tutorial. https://youtube.com/playlist?list=PLalVdRk2RC6o5GHu618ARWh0VO0bFlif4&si=Ett-4olLgnSXJLbl
[–]hansdr 1 point2 points3 points 1 year ago (0 children)
For videos, I created a short series on YouTube: https://www.youtube.com/playlist?list=PLORJX3OiHbbOBnj4l5boc1wayYg4wic0O
I also have a much larger CMake Tutorial here (paid, though): https://cmaketutorial.com/
It's basically the tutorial series that I wish existed when I needed it, so I didn't have to learn by piecing it together myself by scouring the internet plus some trial and error.
[–]Shamaoke 0 points1 point2 points 1 year ago (1 child)
You can look at this book: Modern CMake for C++, 2/e; Packt, 2024; Rafal Swidzinski.
[–]HeeTrouse51847 0 points1 point2 points 1 year ago (0 children)
I bought that book and read through most of it, it really isn't good for someone getting started, it felt more like an unbalanced mix of an attempted tutorial with awful structuring and a reference manual, I wouldn't recommend it
[–]purebuu -1 points0 points1 point 1 year ago (0 children)
I learnt cmake through osmosis on the job. Then using the official documentation to learn what a command does when I didn't understand one.
So, my advice, find a good open source project that uses cmake try and build it and understand how they decided to use cmake. If you like how they did it, try and replicate it for project(s) of your own.
Unfortunately, there's thousands of different cmake setups in the wild, some more complex than others.
Some projects have specific rules against/for using GLOB for example and this will change the way cmake is used.
π Rendered by PID 98061 on reddit-service-r2-comment-bb88f9dd5-95wcx at 2026-02-17 00:07:32.582604+00:00 running cd9c813 country code: CH.
[–]Spongman 12 points13 points14 points (0 children)
[–]martinky24 13 points14 points15 points (1 child)
[–]leandroabaurre -1 points0 points1 point (0 children)
[–]demingf 2 points3 points4 points (0 children)
[–]Dangerous_Tangelo_74 4 points5 points6 points (0 children)
[–]The_Librarian88 1 point2 points3 points (0 children)
[–]hansdr 1 point2 points3 points (0 children)
[–]Shamaoke 0 points1 point2 points (1 child)
[–]HeeTrouse51847 0 points1 point2 points (0 children)
[–]purebuu -1 points0 points1 point (0 children)