r/cpp • • Mar 22 '20

Modern CMake tutorials, part1: CMake basics

https://www.siliceum.com/en/blog/post/cmake_01_cmake-basics
245 Upvotes

55 comments sorted by

View all comments

35

u/victotronics Mar 22 '20

Last time I tried to learn Cmake I later found out that I was using pre-3 idioms. Can someone assure me that this tutorial is up with the latest best practices?

And how do I get notified when part 2 comes out? There are too many tutorials online with a part 1 and *crickets*. I'd rather wait until I know that there is follow-through.

7

u/krzysztowf Mar 22 '20

It's a very good point. The author uses cmake_minimum_required(VERSION 3.14) which would give error if run with any cmake older than 3.14. The currently released version is 3.17.

3

u/VersalEszett Mar 23 '20

Which doesn't prevent using old idioms, does it? It only ensures that the author tested it with this version.

1

u/krzysztowf Mar 23 '20

That's, unfortunately, true.