2 ms·
There are plenty of options other than cmake. Ideally: 1. read the GNU Make manual 2. Write a tiny build system with Make or use any of the precanned ones. I u
by dima55 2y ago
There are plenty of options other than cmake. Ideally:
1. read the GNU Make manual
2. Write a tiny build system with Make or use any of the precanned ones. I use this: https://github.com/dkogan/mrbuild/ https://github.com/dkogan/mrbuild/ but there are many others
In any case, learning how to actually use Make is a prerequisite to having an opinion here.
- hoten 2y agocmake is not just another way to get a Makefile. If you have a cross platform project and want to work in multiple IDEs for specific platforms (xcode/visual studio), cmake or some other build system generator is a huge time saver
- dima55 2y agoThat is the one big use case cmake has, yes. But most (all, actually) cmake I see around me is used to just get a Makefile.
- hedora 2y ago3. Read “Recursive make considered harmful” 4. Follow its advice until you hit the end of where it is useful. (i.e., you can no longer count the number of $ escapes in your own code).
- dima55 2y agoYes. Recursing your Makefiles produces poor results. You know who hasn't read the Make manual and makes recursive Makefiles? The cmake devs. If you truly need a lot of complexity, you can end up with unreadable Makefiles, as you say. Most projects don't need a lot of build logic, though. I have lots of projects using mrbuild, and their builds are clear and easily maintainable. If you truly need a lot more, then Make might not be the best choice. And you can do much better than cmake