Why CMake?

  Рет қаралды 25,333

sudocpp

sudocpp

Күн бұрын

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

Пікірлер: 36
@x_flies
@x_flies Жыл бұрын
“Why Cmake??” That’s exactly what my question is. Thank you for the information. I understand.
@sudocpp
@sudocpp Жыл бұрын
If you want more details how to use CMake, I have a series explaining some of the things you can do.
@hannahm9259
@hannahm9259 6 ай бұрын
Just what I needed!
@SynthByte_
@SynthByte_ 4 ай бұрын
was wondering about this for a while now thanks for sharing it helped a lot understanding what cmake is.
@sudocpp
@sudocpp 4 ай бұрын
Glad it was helpful!
@TuxedoPanther
@TuxedoPanther Жыл бұрын
Great, many thanks 👍
@snieguzary
@snieguzary 10 ай бұрын
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.
@sudocpp
@sudocpp 10 ай бұрын
Yeah! I agree that is a great option as well!
@Luis-jl6oh
@Luis-jl6oh Ай бұрын
I was just curios about what it was, thank you.
@manzelo9855
@manzelo9855 7 ай бұрын
Man, this is the best video that I saw on KZfaq, Thanks :D
@sudocpp
@sudocpp 6 ай бұрын
Glad you enjoyed it!
@golgi3191
@golgi3191 Жыл бұрын
Good video, Quite Banging even.
@sudocpp
@sudocpp Жыл бұрын
Glad you liked it, there is a whole series of you want to get into the nitty gritty.
@PCB389
@PCB389 Жыл бұрын
Great info!
@sudocpp
@sudocpp Жыл бұрын
Glad it was helpful!
@bennguyen1313
@bennguyen1313 6 ай бұрын
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?
@sudocpp
@sudocpp 6 ай бұрын
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.)
@djohardudaev95
@djohardudaev95 5 ай бұрын
I just hit "run code" in visual studio and thats it
@sudocpp
@sudocpp 4 ай бұрын
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.
@charliesumorok6765
@charliesumorok6765 9 ай бұрын
Why not make?
@sudocpp
@sudocpp 4 ай бұрын
Lol, why not just compile manually by command line? There are lots of ways and everyone prefers different ways.
@NoOne-ev3jn
@NoOne-ev3jn 9 ай бұрын
Why cmake instead of make?
@sudocpp
@sudocpp 9 ай бұрын
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.
@ukyoize
@ukyoize 6 ай бұрын
​@@sudocppWindows is a bad system,you shouldn't use it in the first place.
@bhhhhhhhhhhhhhhhhhh
@bhhhhhhhhhhhhhhhhhh 5 ай бұрын
Windows is a bad system,you shouldn't use it in the first place, i use arch btw
@federaloffice
@federaloffice 4 ай бұрын
"bad system" "prove it"
@bedwar12494
@bedwar12494 3 ай бұрын
@@federaloffice ancient kernel, worse for power users, worse for developers, ram consuming, cpu eating, storage stealing, spyware, bloatware why would i use it?
@neupanes48
@neupanes48 Жыл бұрын
Sorry but the video doesn't answer why cMake at all, it answers more about how to use CMake.
@StrataVision
@StrataVision Жыл бұрын
he talks about it in 2:45 . its more of automation tool and cross compile capabilities
@mr_wormhole
@mr_wormhole Жыл бұрын
he actually does, it is for cross-platform building. It is so cumbersome to write makefiles, cmake just generates it
@sudocpp
@sudocpp Жыл бұрын
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.
@zkdadof4
@zkdadof4 9 ай бұрын
By using it, one can intuit its purpose.
@ukyoize
@ukyoize 6 ай бұрын
​@@mr_wormholeIn what universe? CMake is a confusing mess. Regular make is easy.
@muhdiversity7409
@muhdiversity7409 5 ай бұрын
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.
@sudocpp
@sudocpp 5 ай бұрын
I'll have to do a tutorial on how to write for NMake on Windows 😂
Getting Started with CMake on Linux [Ep 1.1]
9:11
sudocpp
Рет қаралды 2,9 М.
why do header files even exist?
10:53
Low Level Learning
Рет қаралды 372 М.
Khó thế mà cũng làm được || How did the police do that? #shorts
01:00
Survival skills: A great idea with duct tape #survival #lifehacks #camping
00:27
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 15 МЛН
Using docker in unusual ways
12:58
Dreams of Code
Рет қаралды 411 М.
Modern CMake for C++
11:38
Smok Code
Рет қаралды 40 М.
CMake - the essential package
27:54
Code for yourself
Рет қаралды 9 М.
Better CMake Part 1 -- Basic Project Setup and Usage
11:31
Jefferson Amstutz
Рет қаралды 44 М.
Introduction to CMake Crash Course
14:08
PunchedTape
Рет қаралды 9 М.
you will never ask about pointer arithmetic after watching this video
8:01
Low Level Learning
Рет қаралды 233 М.
C++ in VS Code: Building your Code with CMake
9:37
Visual Studio Code
Рет қаралды 16 М.
Creating and Using Libraries in CMake [Ep3]
13:51
sudocpp
Рет қаралды 10 М.
How C++ took a turn for the worse
5:03
Code Persist
Рет қаралды 259 М.
В России ускорили интернет в 1000 раз
0:18
Короче, новости
Рет қаралды 1,3 МЛН
Secret Wireless charger 😱 #shorts
0:28
Mr DegrEE
Рет қаралды 2,5 МЛН