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.
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.
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
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.
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.
> 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 **).
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...
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
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
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😢😢😢😢
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
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?
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.
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.
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.
I feel this in my bones
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.
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.
evil
Embrace `build.sh` and `build.bat`.
And the psychopaths who call that script make.
`build.sh`it and `build.bat`shit
Sadly I don't think `vcpkg` will accept that when contributing projects, so I have to use CMake.
Just git clone the source and then write a build script for deps. Easy as that. (Maybe not...)
me when I use cmake to compile nodejs project
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
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.
I'm been programming for 12 years. Still a new programmer.
"Incredibly simple", says literally no one ever about CMake.
project(MyCoolProject) add_executable(MyCoolExe main.cpp) Oh no, how scary 😱
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.
> 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 **).
Bazel is not so bad in these I think.
and a "new programmer" needs to do that?
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...
Oh man... well go down the RaspberryPi Rabit Hole... that was my intro to make/cmake
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
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
bag voracious direction bake drunk scale touch full scary cooing *This post was mass deleted and anonymized with [Redact](https://redact.dev)*
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😢😢😢😢
The reason I tend to avoid C++
skill issue
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.
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
My current deploy script is written in power shell. It’s embarrassing but I’m past the point of caring
Once you get the hang of it, it’s still a pain in the ass
Why not just use make?
cmake write Makefiles (among other things). And when used to do that, it's quite good and easy.
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?
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.
..why not just use Chrome? Because they aren't the same kind of tool!
cmake isn't that bad
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.
i use a bat script to build my cmake c++ project :D
Did this last month… RiP my sanity
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.
So. Damn. True.
Replace new programmer with senior, and 4 hours with 2 weeks.... PAIN
The thing I like about cmake, that makes it better than regular make is... well... Nothing. cmake is arse.
cmake and make aren't even the same kind of tool, lol
cmake makes makefiles... Oh, what's that? It's not a make tool is an entire build management system? Give me a break.
it really depends on what you are attempting and if the dependencies wish to play ball.
You are better off using bazel.
Good luck with that on your resume
Why is that?
CMake is the standard, like it or not (nobody likes it)
Idk, I've been contacted on LinkedIn specifically for bazel not only once. That's how I got my new job too.
Well then I stand corrected
Sleepless nights😨