r/cpp • soup • Mar 10 '26

Dynamic Modules

https://mwasplund.github.io/blog/2026/03/09/dynamic-modules
7 Upvotes

23 comments sorted by

View all comments

Show parent comment

1

u/Classic_Knowledge_46 Mar 15 '26

Just to contend the wording of ”slow” a bit (to give some nuance): Anecdotally speaking — currently working on (modern, target-based) CMake and build2 projects in parallel — the latter is (practically) faster in pretty much every regard. Yes, the pre-process (header extraction) step shifts the total work load a bit (not without gain), but in the end the iteration times are a breeze compared to CMake. The mental model in build2 just appears to be orders of magnitude better for the task at hand (and its early support for C++ modules while CMake still struggles kind of shows it). It also comes with other perks like early detection and better diagnostics of missing headers/include paths etc.

Again, anecdotal, but having personally made the transition from CMake to build2 I wouldn’t revert back for any amount of money. build2 made C++ fun once again.

1

u/not_a_novel_account cmake dev Mar 15 '26

OP is working on their own in-development build system, not trying to choose among the existing ones. build2-with-preprocessing is slower than hypothetical-build2-using-scanners is the point, the technique is slower. Whether build2 is faster for any given task than CMake/Meson/MSBuild/etc isn't the question.