3 ms·
Raw C++ is unsuitable as a build language, so you'll have to layer a DSL on top of it. Either way you're learning a new language. As to "why learn all the quir
by ridiculous_fish 9y ago
Raw C++ is unsuitable as a build language, so you'll have to layer a DSL on top of it. Either way you're learning a new language.
As to "why learn all the quirks of CMake," the selling points of CMake are its widespread availability, maturity, and coverage. For example, just on the packaging side, it knows how to create tarballs, .debs, .rpms, Windows .msi files, multiple flavors of Mac installers...
Less mature build tools require you to implement this stuff manually. CMake mostly handles it for you (and has the scars to prove it).
- desertrider12 9y agoC++ as it exists now is unsuitable, but I can imagine an alternate history where C++ actually allowed arbitrary compile time execution (better than macros and constexpr). Then someone would have made a library for build system logic, and all the user would have to do is g++ project.cpp.
- fatbob 9y agoHerb Sutter has a proposal for metaclasses, which involve running some compile-time C++-like code. I don't think it would stretch to this, but it's heading in your direction.
- pjmlp 9y agoI do like cmake, however I think that actually C++03 is the one unsuitable, C++17 is quite capable. All those actions can be easily modeled in a libraries coupled with a DSL.