Why CMake?
ฝัง
- เผยแพร่เมื่อ 5 มิ.ย. 2024
- Have you ever asked yourself, why does CMake exist or why would I want to use it? This video aims to answer these questions.
0:00 Welcome
0:25 Tools I am Using (to follow along)
2:20 Comparing to building without CMake
2:45 Why CMake
4:48 Example Time: Making a CMakeLists.txt
5:52 Using CMake from the Command Line
8:17 Using CMake integrated into Visual Studio Code
10:23 Using the CMake Toolbar for Debugging
11:14 Recap Why CMake Exists - วิทยาศาสตร์และเทคโนโลยี
“Why Cmake??” That’s exactly what my question is. Thank you for the information. I understand.
If you want more details how to use CMake, I have a series explaining some of the things you can do.
Man, this is the best video that I saw on TH-cam, Thanks :D
Glad you enjoyed it!
was wondering about this for a while now thanks for sharing it helped a lot understanding what cmake is.
Glad it was helpful!
Just what I needed!
Great, many thanks 👍
I was just curios about what it was, thank you.
Great info!
Glad it was helpful!
Good video, Quite Banging even.
Glad you liked it, there is a whole series of you want to get into the nitty gritty.
instead of manually running "ninja" you could have invoked "cmake --build ." While the effect is identical, you don't have to remember which generator was used and what binary name is related to it.
Yeah! I agree that is a great option as well!
I've read that
"Make uses Makefiles to make C."
"CMake uses CMakeLists to make Makefiles to make Make make C."
However, is it possible to use CMake with Visual Studio IDE Community?
For example, there are some projects (ex. frang75 / nappgui ) that say the prerequisites are:
Visual Studio
CMake
Kind of ambiguous if this refers to the Visual Studio Code editor or the Visual Studio IDE. BTW, in the latter, there is a drop-down to select if you are want to build a 32-bit or 64-bit exe, how would this be done using CMake?
Having used both VSCode and VS IDE, I'm guessing it is for VSCode. VS IDE is kind of a walled garden experience. It is possible to get CMake to do both 32 but and 64 bit, however it does require knowing which compiler you specifically are using. (As far as I know there isn't a generic way per se.)
Why not make?
Lol, why not just compile manually by command line? There are lots of ways and everyone prefers different ways.
I just hit "run code" in visual studio and thats it
Yep, that is an option. However for professional use standard Visual Studio is quite expensive, and it doesn't have releases for Linux and the like.
Why cmake instead of make?
Make works well on Linux, but there isn't a great Make solution for Windows. CMake does allow you to build with Make, ninja, and a few others. Personally I slightly prefer BSDs bmake over GNUs make.
@@sudocppWindows is a bad system,you shouldn't use it in the first place.
Windows is a bad system,you shouldn't use it in the first place, i use arch btw
"bad system"
"prove it"
@@federaloffice ancient kernel, worse for power users, worse for developers, ram consuming, cpu eating, storage stealing, spyware, bloatware
why would i use it?
Sorry but the video doesn't answer why cMake at all, it answers more about how to use CMake.
he talks about it in 2:45 . its more of automation tool and cross compile capabilities
he actually does, it is for cross-platform building. It is so cumbersome to write makefiles, cmake just generates it
I'm sorry you weren't able to find the content you were looking for easily. I have added chapters to the video so hopefully it is easier to locate.
By using it, one can intuit its purpose.
@@mr_wormholeIn what universe? CMake is a confusing mess. Regular make is easy.
Why cmake? You decided that you have nothing better to do with your life? Just write a Makefile and get on with your like. At least make is properly documented.
I'll have to do a tutorial on how to write for NMake on Windows 😂