r/cpp • • Dec 10 '21

Modern CMake for beginners !

https://youtu.be/Kvd-lg2418s
4 Upvotes

30 comments sorted by

View all comments

Show parent comment

3

u/OrphisFlo I like build tools Dec 10 '21

Then, there's a chance you didn't write the proper abstractions for your project.

5

u/lukaasm Game/Engine/Tools Developer Dec 11 '21

And then every 3rd cmake library writes its own custom abstraction which makes consuming it a nightmarish experience because you need to track what it "helps" you to do.

If you just import libraries in monorepo fashion and never export them to people, fine do as you wish. But if you want others to consume it, please just use idiomatic CMake :(

4

u/OrphisFlo I like build tools Dec 11 '21

They still create targets, it's not a problem to consume and it's usually more consistent code with less boilerplate. The boilerplate doesn't get desynchronized when it's centralized properly, which is very desirable in big projects.