I hate CMAKE. That's the post. Just hate it.

Why the FUCK does CMAKE generate VS project files that depend on having CMAKE installed on your system? And it has to be in a fixed path? And EVERYTHING has to be in a fixed path?

Have CMAKE developers ever compiled something or used version control? This is unusable and I am very angry and it's Monday and I haven't had my coffee yet.

#cmake #programming #cprogramming

Ok, I finally managed to make this project work on a different machine it ran CMAKE and just regenerated the project discarding all my changes.

What in the actual hell is this?

#cmake #programming #cprogramming

Show thread

@sos Isn't that's how CMake (or other tools like that) should be used?

Store CMake config on the repo, regenerate project files locally. When adding/removing files, do that in CMake, and regenerate again. That's the idea 🤷‍♂️

I'm definitely not saying it's a good idea 😅

@kkolakowski @sos It's a much better idea than having to maintain a myriad of separate build scripts for each platform and having to deal with stuff like Visual Studio or Xcode directly. CMake isn't a particularly beautiful implementation of that idea, but any other sane build system works the same way.

@dos @kkolakowski Why is it so bad with Visual Studio then?

It tries to solve a problem that didn't exist.

@sos @dos @kkolakowski the misunderstanding seems to be what the generated .sln is when targeting vc, it's the intermediate file, it shouldn't be used directly as any changes to it won't be saved. You should just be setting variables in the cmakelists.txt file so the generator you're using can manage the files (that should be the only "project" file you store in the repo, most modern ide's can directly use it as well)

NOTHING in the build folders should be in vcs, those are system dependant

@raptor85 @dos @kkolakowski But I wan t to use VS to do actual work. You guys have no IDES?

Follow

@sos @raptor85 @kkolakowski To do actual work, we have proper IDEs that can handle such exotic and rarely-seen things as CMake projects (/s) natively 😂

@dos @sos @kkolakowski yup, and with cmake projects you should always try to use the actual variables, not specific compiler/etc overrides unless necessary as those are better off as settings in the local toolchain, not the project file (for instance for -ffast-math you may not want that on in a debug build or the user may want it disabled for an embedded processor)

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml