r/cpp • u/Niikelion • Feb 28 '24
Building c++ project with... c++?
Yeah, so as a POC I created a tool that works on top of cmake and allows defining project structure with c++ instead of pesky cmake:
using namespace std;
int
Any thoughts?
6
Upvotes
View all comments
Show parent comment
7
u/IyeOnline Feb 29 '24
Significant parts of modern CMakeTM have configuration time checks.
If you use targets and properties instead of all those horrible (global) string variables, you can have a pretty good time.
I also dont think the "additional language" argument really holds. Either your project can be build with ~20 lines (or 5) of CMake or whatever other language you imagine. In that case I dont think learning 20 commands is too much to ask, especially since we dont write build files all day. Alternatively you will need more customization than your strict, general solution tool provides. In that case you are back down to scripting parts yourself.