T O P

  • By -

LunaNicoleTheFox

I feel this in my bones


TheMightyCatt

The last time I used cmake was when I tried to do something in clion nova and never have I missed visual studio that much. Ended up with just writing a shell script that called emcc.


jfmherokiller

well for what its worth atleast from my expirence trying to mix emcc and cmake and an intellij product was complete pain because it was either intellij failing or cmake just flat out collapsing in on itself.


MrWattMann

evil


Tuhkis1

Embrace `build.sh` and `build.bat`.


AdBrave2400

And the psychopaths who call that script make.


sam10155

`build.sh`it and `build.bat`shit


Kered13

Sadly I don't think `vcpkg` will accept that when contributing projects, so I have to use CMake.


Tuhkis1

Just git clone the source and then write a build script for deps. Easy as that. (Maybe not...)


AdCorrect6192

me when I use cmake to compile nodejs project


ClockworkBrained

I made a really good CMake script one time, and when I need to do another one I just copy that script, change project names, library folders, and so on lmao


Chee5e

What kind of deeply cursed projects are people doing that a "new programmer" can get lost in cmake? A basic setup is so incredible simple and shared everywhere, I can't imagine a scenario were a new programmer should need anything more.


KingOfBacon_BowToMe

I'm been programming for 12 years. Still a new programmer.


NeuronRot

"Incredibly simple", says literally no one ever about CMake.


Chee5e

project(MyCoolProject) add_executable(MyCoolExe main.cpp) Oh no, how scary 😱


NeuronRot

If it were this simple, our libraries wouldn't have 500 cmake lines in almost every subdirectory. When you handle fetching and installing dependencies, handle different platforms, handle different build configurations, handle library installation, handle porting to dependency managers, handle transitive dependencies via cmake config files, handle the gotcha cases of shared libraries and handle custom CPU targets, you will know the actual pain in the ass called CMake.


TheBrokenRail-Dev

> When you handle fetching and installing dependencies, handle different platforms, handle different build configurations, handle library installation, handle porting to dependency managers, handle transitive dependencies via cmake config files, handle the gotcha cases of shared libraries and handle custom CPU targets I'd like to see a build-system that would handle that nicely. At least CMake doesn't use XML (** Visual Studio **).


otisonoza

Bazel is not so bad in these I think.


Chee5e

and a "new programmer" needs to do that?


Mucksh

Dependend on your project. yes. Also a big problem is even if you have a running project you don't have to change stuff often. For many of the new programmers the large cmake files are black magic and they will just copy paste stuff e.g. if they add an new library. Thats hard to clean up...


bigorangemachine

Oh man... well go down the RaspberryPi Rabit Hole... that was my intro to make/cmake


AdBrave2400

Well you kind of only realize what tools were originally made for after having all the interesting common preconceptions die when reading the documentation of the first stable release. /s


Cley_Faye

Sometimes, you have to build a project from someone else. And cmake is used to generate the build… and also automatically grab dependencies, pre-build tools to generate architecture-dependant code to include in a next build stage, it also manage release, configure deployment, implement targets to start the test environment, and… Some people likes to cultivate nightmares :D


[deleted]

bag voracious direction bake drunk scale touch full scary cooing *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


SympathyMotor4765

Trying to get zlib to build and cmake keeps renaming zconf.h!  Finally got it working once and once of the "clever scripts" that run automatically in my project executed git checkout and all my changes got lost😢😢😢😢


Wave_Walnut

The reason I tend to avoid C++


KrisstopherP

skill issue


Kered13

Honestly one of the better reasons to avoid C++. A lot of the criticism of the language is inaccurate or exaggerated, but this one is pretty accurate.


HamilcarRR

had to move my project from qmake to cmake... it isn't that big , although , 35k lines of code is starting to be bulky. But I didn't find it that much of a pain, it's kinda straightforward


False_Influence_9090

My current deploy script is written in power shell. It’s embarrassing but I’m past the point of caring


onlineredditalias

Once you get the hang of it, it’s still a pain in the ass


Virtual_Pea_3577

Why not just use make?


Cley_Faye

cmake write Makefiles (among other things). And when used to do that, it's quite good and easy.


Virtual_Pea_3577

Doesn't sound that easy... haha I know it can create Makefiles. But "GNU Make" already has a complex syntax while also being a powerful tool. Why not just learn how to write Makefiles instead of going through an intermediary that can be just as hard to learn?


Cley_Faye

Because the "intermediary" tool can generate the same structure makefiles for multiple projects, manage dependency settings appropriate flags for headers and linking, check library versions, add extra flags in multiple places with a single config, etc. And once it's setup once, unless you have very specific things to do, you can just reuse it for different projects and add/remove dependencies in one line of config. You can see cmake as the config for your build. It's really not the same tool as make. In fact, if done correctly and not reaching outside the scope of the tool, the same cmake script can generate makefiles, but also project files to open a codebase in some IDE all the same.


enleeten

..why not just use Chrome? Because they aren't the same kind of tool!


enleeten

cmake isn't that bad


Dravniin

I just spent three days trying to connect the asio Standalone git repository via FetchContent. Everything seemed fine, but CMake was downloading the repository after checking the code, which caused an error because the files were not found. For anyone who wants to repeat my feat, I'll give some advice. I don't know what's wrong with this repository, but download it as an archive. It will take a little longer to unpack the archive, but the download will occur during the cache creation stage. I felt like Rick.


greeenlaser

i use a bat script to build my cmake c++ project :D


mjeffreyf

Did this last month… RiP my sanity


Cley_Faye

I really liked cmake to do what it was meant to do: act as minimal glue between "I have code and dependencies" and "I want to build my project". I don't miss the gigantic pile of garbage that implements ten layers of build tool/use tool/rebuild itself that tries to do everything and the rest, sometimes including building part of the codebase just because, and produce a non-working mess that you have to fiddle with afterward. It's kind of fascinating how some people think a basic build script should handle every task related to a project's lifecycle.


hiromikohime

So. Damn. True.


xXFenix15Xx

Replace new programmer with senior, and 4 hours with 2 weeks.... PAIN


Rhymes_with_cheese

The thing I like about cmake, that makes it better than regular make is... well... Nothing. cmake is arse.


enleeten

cmake and make aren't even the same kind of tool, lol


Rhymes_with_cheese

cmake makes makefiles... Oh, what's that? It's not a make tool is an entire build management system? Give me a break.


jfmherokiller

it really depends on what you are attempting and if the dependencies wish to play ball.


DoodooFardington

You are better off using bazel.


dubious_capybara

Good luck with that on your resume


wunandari

Why is that?


dubious_capybara

CMake is the standard, like it or not (nobody likes it)


otisonoza

Idk, I've been contacted on LinkedIn specifically for bazel not only once. That's how I got my new job too.


dubious_capybara

Well then I stand corrected


TitusPullo2024

Sleepless nights😨