r/cpp • u/CalligrapherThese606 • Jul 21 '22
CMake is a hell of a software, period.
Really CMake is good only for one thing being the sacred build generator system in the c/cpp world.
F*** the weird syntax and werid structures.
edit 1: some might argue it's the best avaiable solution to the problem domain, and it is. the problem is the syntax, the unintiutive way of specifiying option and simple compile parameters and options and lack of examples and resources on how to do the simplist things is a wasting too much time.
yeah modern cmake that encourge using targets and their properties is by far a lot better but still is extremely unintuitve due to the syntax and logic around it.
sorry for the typos.
edit 2:
i am really considering changing my main language for personal projects to rust or the new thing called carbon by google at least there is not a hell of backward compatibility garbage i need to know.
10
u/Drugbird Jul 21 '22
I've used / written both cmake and make files, and have to say that I generally prefer the makefile syntax.
I find it refreshingly straightforward how you can simply write: "to get file A, you need files B, C and D and then call command X".
Because you have direct access to the tools which are used, some things which can be tricky in Cmake can be trivial in make.
Because of this, I find that writing makefiles is a bit similar to writing docker files.
This direct approach is obviously impossible in Cmake, because it has to be platform independent. But the downside is that you need to go through the CMake middleman syntax.
Also, don't misunderstand me. Make is also horrible, especially when it comes to debugging (lol, good luck).