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 comments

7

u/AlexReinkingYale Feb 07 '21

Too bad. Then don't use CMake. You're basically saying "writing bug-free code is a non-starter for me".

3

u/codevion Feb 07 '21

I think we keep using it so long as it keeps working. I’ll find an alternative when they remove support for it

2

u/qv51 Feb 07 '21 edited Feb 07 '21

Don't listen to him. There was a talk from a packager for vcpkg who basically begs one to glob. It will make packaging much easier, and forces you to organize your library better for yourself. Edit: link https://m.youtube.com/watch?v=_5weX5mx8hc

-2

u/codevion Feb 07 '21

Thank you! I've had a lot more issues with failing to add the source file when listing manually than I've ever had from globbing so even the slightly slower builds are worth it.

2

u/Xavier_OM Feb 08 '21

Adding source files manually is really not a big deal you know, it doesn't happen so often in everyday life, and when it happens adding them to CMakeLists.txt (or in your IDE) does not take such a long time, you add a few lines and voilà.

The codebase I work on is quite big (~2400 .h/.cpp files) and even on such size there is no need for globbing.

1

u/codevion Feb 08 '21

I've had to do it at work before so I understand it's just a minor thing but occasionally I do misspell it or get the path wrong, etc and it's just annoying. It might be personal preference from other languages where such files are tracked automatically by your build system but I still find it an annoyance.

→ More replies (0)