CMake vs Make - A developer's perspective
HTML-код
- Опубликовано: 8 сен 2024
- What's the difference between CMake and GNU Make? And why would we choose one over the other? Let's go beyond the surface level difference such as CMake being a "meta-build system," and look at what it's actually like to use them...
Click the following link for The CMake Tutorial:
cmaketutorial....
Click here for a summary of the video:
keasigmadelta....
#programming #tech #softwaredevelopment #cmake #cpp
Great Video! Can you also make a video on CMake explaining what toolchains are?
Thanks. I'll think about doing a toolchains video...
Here you go: ruclips.net/video/9vw0iO6uwUk/видео.html
Love it@@KeaSigmaDelta
@@default2043 Great!
Thank you so much for this short but thorough explanation! 👍
You're welcome.
Great explanation!
Glad it was helpful.
I started with Make and enjoy it (sounds masochistic now that I say it aloud), but I should probably learn how to use at least the basics of CMake to get it into my repertoire, it's fairly common and I tend to just skirt around it when I come across it lol.
Sounds like you're where I was a number of years ago. I had figured out how to get make to do most of what I wanted. I would manually adapt projects that use CMake to use Make instead... until that was too much of a pain.
Thanks man
You're welcome.
Just something wrong with one compiler?
Not sure what you're asking.
The best compiler to use depends on each platform (e.g., Visual Studio on Windows).
man looks like the smaller version of luis van gaal 😅
Heh. Well, he's from the Netherlands, just like my parents...
I had to go back from make to individual builds for each platform. Cmake is just bad. Still use it on Linux but I want to go away too because you can’t share compiled files between multiple targets unless you end up with lots of object libraries. And modern winapp sdk forces msbuild anyway
Interesting. That's not a problem that I've encountered.
Fairly common problem for industrial usage of C++! CMake helps DevOps teams interact with the build toolchain more easily, but the control that Make provides can lead to more efficient builds in large projects, so seasoned developers tend to favor Make. I want to try CMake with Ninja, though, since that is aimed at helping with this issue. Could you do a video about CMake using Ninja?
@@tobyfrancisv I haven't tried using CMake with Ninja yet. Are you saying that Ninja with CMake could lead to faster builds than using the native build system (e.g., Make)?
Make was going crossplatform going back decades.
You can use it on multiple platforms, including Windows. However, it's normally only used with GCC.
I personally wouldn't use GNU Make with anything other than GCC.
@@KeaSigmaDelta We used it in 94 at a company that had 16 flavors of UNIX. You make is sound like nobody did it. I think that is wrong. I know you have to say stuff to make a point and sell cmake.
@@wjrasmussen666 At no point did I suggest that nobody did it. I've personally used GNU Make on multiple platforms, including Windows.
You're welcome to disagree with me. But, insinuating that I'm saying "stuff to make a point and sell cmake" is both overly cynical and rather insulting.
@@KeaSigmaDelta No you didn't but you did the left handed version of it. cmake does it.
@@wjrasmussen666 No, but believe whatever you want.