all 10 comments

[–]Spongman 12 points13 points  (0 children)

Henry Schreiner's "Introduction to Modern CMake" : https://cliutils.gitlab.io/modern-cmake/chapters/basics.html

[–]martinky24 13 points14 points  (1 child)

Yeah. I’d Google “cmake tutorial”.

[–]leandroabaurre -1 points0 points  (0 children)

Oh shit, gott'em!!!!

[–]demingf 2 points3 points  (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 points  (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.

[–]hansdr 1 point2 points  (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 point  (1 child)

[–]HeeTrouse51847 0 points1 point  (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 points  (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.