Hacker News new | ask | show | jobs
by pornel 1477 days ago
It's nice that it tries to have an abstraction layer over compiler flags. Too many build tools are a mere indirection, not abstraction over underlying tools, and require each build script to deal with every compiler's flags the hard way (especially painful for MSVC vs gcc-alikes).

I wish this went further to have an opinion on project layout, like location of source files and include dirs. Every C/C++ build system I've seen has a configuration-over-convention approach rather than the other way around. I get it's by necessity to accommodate arbitrary pre-existing projects, but it's unfortunate that it perpetuates C projects being snowflakes, each with a slightly different directory structure, approach to includes, naming scheme of defines, different ways of enabling optional features, different way of running tests, and so on. Because of that maximal flexibility even projects using the same build system end up being gratuitously different.

1 comments

I think an opinionated project layout (like Pitchfork) makes the most sense for packages. It would be nice to go in that direction one day.
I can definitely second that making use of sane default project structure to reduce even more boilerplate would be an extremely attractive feature. Reducing some of the incomprehensibly large amount of incidentally complex C++ project builds would practically qualify as humanitarian aid at this point.