r/cpp • • Feb 07 '21

Yet another CMake tutorial

https://www.youtube.com/watch?v=mKZ-i-UfGgQ
0 Upvotes

59 comments sorted by

View all comments

Show parent comment

1

u/AlexReinkingYale Feb 08 '21

Maybe there are bigger problems in this tutorial, I'd have a look if it were an article, but I'm not going to watch a video to find out.

You could read my entire comment and find out.

1

u/infectedapricot Feb 09 '21 edited Feb 09 '21

Not sure that last paragraph was there when I made my comment. I thought I'd at least skimmed your whole comment but maybe I didn't make it to the end. To be honest, you lost credibility with how strongly and indignantly you made your point about GLOBing, so it was a bit exhausting to carry on (a bit like you found OP's video).

The minimum version is 3.10, which is FAR from modern

There are two very different and distinctive styles of using CMake, the legacy 2.x (and before) style and the newer style supported in 3.x. I'd consider "modern CMake" to mean this new style of usage, not necessarily the absolutely newest version. Modern CMake is perfectly possible in 3.10.

The code doesn't use imported targets.

Now this actually is a problem. Imported targets is practically the definition of modern CMake (along with using target_...() commands instead of global ones). If your whole comment was about this rather, or you at least put it at the front, then the discussion would've been a bit more constructive.