Problem is that you completely have to trust the makefile generation. They are unreadable, let alone undebuggable, if you get some weird error. Even if it would take me a 3 line makefile, CMake still generates 100s of lines
Problem is that you completely have to trust the makefile generation. They are unreadable, let alone undebuggable, if you get some weird error. Even if it would take me a 3 line makefile, CMake still generates 100s of lines.
The reason people use CMake is because they don't care about those low level details and will never ever debug at that level.
If building using Makefiles doesn't work then just have CMake generate a Ninja build instead of a Make build and see if that fixes the problem.
The point of CMake is to describe the structure of projects in a build system-agnostic fashion so that you can write cross platform projects that can compile on various platforms, many of which won't use Makefiles at all.
Whether it's the "party line" or not I write software that actually compiles on three desktop operating systems, two mobile operating systems, three CPU architectures and is regularly built with make, ninja, msbuild, and xcode.
If I didn't have cmake I would need to maintain five independent build systems.
Since it spares me from that I'm willing to forgive its clunky syntax and learning curve because none of the alternatives are clearly better. Some alternatives have different tradeoffs where certain aspects get better but then other aspects get worse.
I'm dealing with at least one library that needs a commandline of dozens of lines, since it imports multiple other libraries, only some of which use cmake. Once your cmake setup has options that can be switched on/off depending on the user installation, you're in for a world of hurt. "Yes, I have this package, and I'm telling you to use it, so why don't you use it".
I've never had it generate a bad Makefile though. That part of it is quite reliable. The problem is always either the code or in the CMake description of the project.
Today nobody makes makefiles. all makefiles in existence have been created ages ago, when dinosaurs roamed the earth and we merely add a line or fix a bug from time to time.
My only run-in was someone trying to explain it to me. He was actually using it for a somewhat widely used programming project. That project was ultimately superseded by something better, so presumably his imake scripts died with it.
WALHAY@reddit
CMake
victotronics@reddit
Problem is that you completely have to trust the makefile generation. They are unreadable, let alone undebuggable, if you get some weird error. Even if it would take me a 3 line makefile, CMake still generates 100s of lines
elperroborrachotoo@reddit
CMake is not to be insulted. After all, it's better than autotools.
ABlockInTheChain@reddit
The reason people use CMake is because they don't care about those low level details and will never ever debug at that level.
If building using Makefiles doesn't work then just have CMake generate a Ninja build instead of a Make build and see if that fixes the problem.
The point of CMake is to describe the structure of projects in a build system-agnostic fashion so that you can write cross platform projects that can compile on various platforms, many of which won't use Makefiles at all.
victotronics@reddit
Yes, that's the party line. But cmake is very sophisticated, so if it fails it's usually for totally non-obvious reasons.
ABlockInTheChain@reddit
Whether it's the "party line" or not I write software that actually compiles on three desktop operating systems, two mobile operating systems, three CPU architectures and is regularly built with make, ninja, msbuild, and xcode.
If I didn't have cmake I would need to maintain five independent build systems.
Since it spares me from that I'm willing to forgive its clunky syntax and learning curve because none of the alternatives are clearly better. Some alternatives have different tradeoffs where certain aspects get better but then other aspects get worse.
victotronics@reddit
I'm dealing with at least one library that needs a commandline of dozens of lines, since it imports multiple other libraries, only some of which use cmake. Once your cmake setup has options that can be switched on/off depending on the user installation, you're in for a world of hurt. "Yes, I have this package, and I'm telling you to use it, so why don't you use it".
kisielk@reddit
I've never had it generate a bad Makefile though. That part of it is quite reliable. The problem is always either the code or in the CMake description of the project.
victotronics@reddit
I'm getting to that level of trust: I now believe that I can leave the makefiles alone.
ketralnis@reddit
Personally I downvoted for the downvote victim complex
calrogman@reddit
I remember a time when downvotes were for posts or comments that didn't contribute to the discussion and it was considered uncouth to announce them.
__konrad@reddit
But how to generate CMakeLists.txt? ;)
realguy2300000@reddit (OP)
STOP MAKING TURING COMPLETE BUILD SYSTEMS THAT TAKE 30 MINUTES TO BOOTSTRAP! if you need something complex, just use meson!
helloiamsomeone@reddit
Nowadays it makes single config Ninja files most of the time for me.
Snarwin@reddit
Make is the worst build system, except for all the others that have been tried.
Routine_Left@reddit
Today nobody makes makefiles. all makefiles in existence have been created ages ago, when dinosaurs roamed the earth and we merely add a line or fix a bug from time to time.
that's all.
And everyone forgot why they're the way they are.
Eric848448@reddit
We all do. We find one, copy it, then fuck with it until it (mostly) does what we want.
CrackerJackKittyCat@reddit
Anyone remember xmkmf / imake, based on C-pre-processor templates? Good times.
victotronics@reddit
I vaguely remember running into imake somewhere early 1990s,
azswcowboy@reddit
Was the X windows build automation system. Some unholy mashup of C preprocessing and make files. It got replaced by autotools at some point.
victotronics@reddit
My only run-in was someone trying to explain it to me. He was actually using it for a somewhat widely used programming project. That project was ultimately superseded by something better, so presumably his imake scripts died with it.
azswcowboy@reddit
Yeah, we used it for awhile back in the 90s on a project- it was eventually replaced with cmake.
realguy2300000@reddit (OP)
i think i’m to young for this :’)
victotronics@reddit
The fun part about getting older is the number of useless or plain bizarre things you run into.
victotronics@reddit
Kudos for starting out with an example that involves yacc.
CryptoHorologist@reddit
Let me summarize the video for you with a quote that occurred 17 minutes in: "holy autism".
fragbot2@reddit
I’m the one.
CryptoHorologist@reddit
Thank you for your service.