4 ms·
"Concatenated" builds seem to be the best band-aid for this. Concatenate as many source files as possible before compiling, #include a bunch of cpp files into o
by pjc50 9y ago
"Concatenated" builds seem to be the best band-aid for this. Concatenate as many source files as possible before compiling, #include a bunch of cpp files into one big file. It makes tracking down errors slightly harder and macros a bit more risky, but greatly improves the overall build efficiency.
- ori_b 9y agoAnd trashes incremental compilation time, which is what really matters.
- swift 9y agoIt's a balance, but on many projects the overhead of the headers themselves is so large that concatenating a few .cpp files together doesn't increase incremental compilation time significantly over simply building each .cpp file in isolation.
- pjc50 9y agoIncremental compilation opportunities are rarer than we'd like on C++: as soon as you add a new class member or function, that's potentially a huge recompile.
- DiThi 9y agoYou can have all the files you're working on not concatenated.
- jhasse 9y agoAlso called unity build sometimes.