CMake Tutorial EP 1 | Understanding The Basics

  Рет қаралды 449,815

Code, Tech, and Tutorials

Code, Tech, and Tutorials

Күн бұрын

full CMake playlist: • CMake Tutorial EP 1 | ...
Find me, support me:
Stream: / bytepro17124
Patreon: / codetechtuts
One time donations: www.paypal.com...
Shop via my Amazon Affiliates Link: amzn.to/3bVQ9X0
Business inquiries: codetechtuts@gmail.com
Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.

Пікірлер: 242
@RuoshiWen
@RuoshiWen Жыл бұрын
Great tutorial. I do enjoy that you were giving tutorials in a very relaxing tone. I got really stressed when I learn c++ related contents.
@carlosdalomba
@carlosdalomba 3 жыл бұрын
This was easily the best CMake tutorial/resource I found all week so far. I've been struggling to understand all the terms and how it (CMake) fits into everything. Especially coming from a Unity/C# game dev background, and not really.. understanding much about "builds", "platforms", and "compilers" besides extreme basics/vagueness. Thank you so much, this really makes it feel a lot more doable. P.S. - I'm so glad you use VS Code too! Just started with it today as well haha
@伟建-j4u
@伟建-j4u 2 жыл бұрын
Sorry to interrupt,i am a newer to learn cmake ,is there any tutorial to recommend? Thanks .
@openroomxyz
@openroomxyz 2 жыл бұрын
@@伟建-j4u same :)
@cppdog3549
@cppdog3549 2 жыл бұрын
I think I just found my favorite KZbin channel. I really love the joke in the beginning about our Lord and Savior.....CMake, and I really enjoyed watching your tutorial and learning about how CMake works. I love your style of teaching and it's so intuitive. Thank you for making this video.
@bestganesh
@bestganesh 4 жыл бұрын
This is a very nice introduction to Cmake. Really got what I need. Thanks :)
@CodeTechandTutorials
@CodeTechandTutorials 4 жыл бұрын
Happy it helped
@Augnos
@Augnos Жыл бұрын
Thanks for explaining makefiles in literally the first 5 minutes. I don’t know how every other explanation skips this part and what cmake is even needed for
@journeyman6856
@journeyman6856 4 жыл бұрын
The best CMake tutorials on KZbin!
@milanky
@milanky 3 жыл бұрын
Checkout the Beginner/Intro CMake Course at www.udemy.com/course/master_cmake/?referralCode=D08DF343ABAE2835C3B7
@sirtobi6006
@sirtobi6006 3 жыл бұрын
I came to learn about CMake and directly left an abonoment.
@mr.bun-bunny8830
@mr.bun-bunny8830 4 жыл бұрын
I subscribed because your blender tutorial helped me with video editing and now I'm here because of your coding tutorials and I'm Loving It.
@mr.bun-bunny8830
@mr.bun-bunny8830 4 жыл бұрын
wanted to ask I'm having this g++ error in visual studio code whenever I try to code in C or C++ well it happens when I try to run it any idea how can I solve it?
@CodeTechandTutorials
@CodeTechandTutorials 4 жыл бұрын
@@mr.bun-bunny8830 hard to say without many specifics. Can you post the source code?
@inlovewithtajweed1
@inlovewithtajweed1 3 жыл бұрын
Thank you for sharing. I enjoyed the content. Minor: zues==>Zeus.
@bieldozap
@bieldozap 4 жыл бұрын
seriously, i was starting to watch the OGRE tutorial and when I saw Cmake, it came to my mind "oh boy it would be nice a Cmake tutorial". And here I am. Thank you so much.
@CodeTechandTutorials
@CodeTechandTutorials 4 жыл бұрын
Nice! I'm studying hard to make this next cmake tutorial and hopefully take it to a whole new level
@kavorka8855
@kavorka8855 8 ай бұрын
Simple, clear and fun way of teaching any subject! Now, next ... part 2
@codinger4182
@codinger4182 3 жыл бұрын
This guy looks like *_Gilfoyle_* from *Silicon Valley* . Jokes apart, he explained great!
@hosseinbeiranvand7169
@hosseinbeiranvand7169 3 жыл бұрын
exactly man!
@makermatrix9815
@makermatrix9815 3 жыл бұрын
Sounds like him even more than he looks like him, LOL
@hridaykeswani6459
@hridaykeswani6459 3 жыл бұрын
We will talk about our lord and savior ... what do you think am talking about SATAN! xD
@poganka45
@poganka45 3 жыл бұрын
he reminds me of Lex Luthor's father
@snowman4933
@snowman4933 2 жыл бұрын
true af
@abelashenafi6291
@abelashenafi6291 6 ай бұрын
Thanks man. The shortest yet most efficient and vivid explanation about Cmake and MakeFile. Thanks a lot man. really. Kudos
@sammyiboi
@sammyiboi 3 жыл бұрын
Thanks for this! There's only a few CMake tutorials out there, so this one is definitely welcome :) Just finished the first video. CTT looks awfully close to C++, woah!
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
Awesome, thank you!
@tiendadelchavo4132
@tiendadelchavo4132 3 жыл бұрын
These CMake tutorials are simply the best! Amazing explanation and tips! Thank you so much!
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
Glad you like them!
@juan-jh1qg
@juan-jh1qg 3 жыл бұрын
In windows, run instead the following CMake command: > cmake -S ../../ -B . -G "MinGW Makefiles"
@thedeathchimera
@thedeathchimera 3 жыл бұрын
Thanks man, it kept spitting out visual studio files and I wasn't sure why
@abdullahsulaymaan9085
@abdullahsulaymaan9085 Жыл бұрын
thanks bro, you saved me time
@ORagnar
@ORagnar 2 жыл бұрын
I'm getting a Bob Ross vibe from your style. I expect to see some happy little clouds. 7/14/22, 5:57 p.m.
@ctjanney
@ctjanney 2 жыл бұрын
Fantastic! Thank you. I've struggled with make files, hacking open source setups to compile without direction. Thank you for your clear tutorials.
@anguruso
@anguruso Жыл бұрын
Thank you! I had one hell of a time understanding CMake before watching your videos.
@HY-nt8nk
@HY-nt8nk 3 жыл бұрын
In cmake, where did we mention the kind of compiler to use? At the beginning of the video, in the makefile, it was explicitly mentioned to use 'g++' compiler. But, I did not get how cmake picked the compiler? Can you please answer me this question?
@Karlthegreat100
@Karlthegreat100 2 жыл бұрын
I'm not sure if there are other ways but I usually set environment variables for that, specifically, CC and CXX. So CC=/path/to/clang CXX=/path/to/clang++ cmake..
@blankeyezero
@blankeyezero 7 ай бұрын
thank you.. i was a simple guy coming from interpreted languages... this compiler problem was making things difficult for me as to finding out which c compiler I should use and such...
@moeroe7663
@moeroe7663 3 жыл бұрын
As a C-noob I can say: this is really helpfull!
@opexkoru5157
@opexkoru5157 3 жыл бұрын
Best cmake tutorial I've seen by far. Looking forward to watching the rest of the videos. Thanks!
@russellshahenian2357
@russellshahenian2357 Жыл бұрын
I love it: 'so just please don't' .... i know your're real at that point. Ty great 'simple' effective.
@legitjimmyjaylight8409
@legitjimmyjaylight8409 3 жыл бұрын
It appears I don't have the `-S` option available on my CMake, and it wants to use my `-B` option as both the build and the source directory. It seems this may be because my cmake is out of date, and this is a newer option. My cmake version is 3.10.2. Edit: I've managed to get it updated now to cmake version 3.20.1, and now I can finally use the `-S` option & follow along with this tutorial.
@aogposton
@aogposton 9 ай бұрын
Came to this after doing my own way.... Thank you for the tutorial.
@phillno1751
@phillno1751 2 жыл бұрын
Subscribed. Clear, concise, exactly what I need to get started. I look forward to the next video. Thanks!
@MyMjrox
@MyMjrox 5 ай бұрын
Still the best cmake tutorial
@rsmusic-fh6nl
@rsmusic-fh6nl 6 ай бұрын
only legible cmake explanation i've found, tysm
@uwemisrael5836
@uwemisrael5836 Жыл бұрын
I'm finiding this series very helpfull. Started learning C++. Thanks
@B15HOP
@B15HOP 3 жыл бұрын
So glad you put this in here. The other good tutorial is "cmake good" by vector-of-bool. The cmake library is a little bit more confusing at first than standard makefiles, but they are worth it because makefiles get bloated and tedious very quickly. As you know, the cmake tools bypass this by creating the project Makefiles for you.
@gopinath6946
@gopinath6946 2 жыл бұрын
You said No standard in coding.... Thalaiva You are great...
@Gloryisfood
@Gloryisfood 3 жыл бұрын
Finished watching the first video and I know I will learn something from the series. Thank you, Sir!
@JaCkuevara
@JaCkuevara 2 жыл бұрын
Such a funny guy - and a nice intro - keep it going man! Best Regards
@degancontent1979
@degancontent1979 Жыл бұрын
Good one, looking forward for part 2
@it_raman_suryawanshi1399
@it_raman_suryawanshi1399 Жыл бұрын
Thank you 😊 for making it easy to understand.
@rishabhjain911
@rishabhjain911 2 жыл бұрын
Great job bro You just made it a piece of cake :)
@pdxfunk
@pdxfunk Жыл бұрын
Thanks so much for making this. After struggling setting up my IDE for making embedded code for RP2040 processor, I kept being like "WTF actually IS CMAKE??". Now I know.
@saulmorales372
@saulmorales372 3 жыл бұрын
I appreciate your content and you hella funny!! Thank You Man!!!!!!!
@jiangpengli86
@jiangpengli86 4 ай бұрын
Thank you so much for this great tutorial.
@qc2217
@qc2217 3 жыл бұрын
This is a nice tutorial! Thank you for making it!
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
Glad it was helpful!
@JirongYi
@JirongYi Жыл бұрын
Thanks for creating this video
@lifeisbeautifu1
@lifeisbeautifu1 4 жыл бұрын
Thanks so much for this great tutorial ! :)
@SeanBoborano
@SeanBoborano Ай бұрын
Truly our lord and savior because CMake documentation is just not beginner friendly or should I say TRASH OH MY GODDD MY FRUSTRATION
@justdoingodswork
@justdoingodswork Жыл бұрын
I tried to make a makefile, but terminal is not reconizing command make?
@MohamadAlajouz
@MohamadAlajouz 3 ай бұрын
the ending got me dead 😆
@leiyin1998
@leiyin1998 Ай бұрын
thank you, sir!
@hertzvador2220
@hertzvador2220 2 жыл бұрын
This was very useful. Thank you.
@eyalpery8470
@eyalpery8470 3 жыл бұрын
Excellent! Thanks!
@dimitrigraur8345
@dimitrigraur8345 2 жыл бұрын
Great material, subscribed!
@meenamurthy1503
@meenamurthy1503 Жыл бұрын
You could say cmake creates a make file, easier ro to associate c with create
@77and619
@77and619 3 жыл бұрын
cool guy and gets to the point ! not always like this! tyvm
@Evilanious
@Evilanious 8 ай бұрын
I cannot believe this contains such basic errors that will mislead beginning programmers. It's spelled 'Zeus'! Get it together! Seriously though, thanks. This was very helpful.
@davidnguyen9023
@davidnguyen9023 Жыл бұрын
Simply great.
@timsessions1845
@timsessions1845 Жыл бұрын
Praise be to cmake
@lyndazaid9560
@lyndazaid9560 Жыл бұрын
thank you so much,it was helpful. please sir i have a question ,i tried to build a project with cmake but in it's configuration it throws an error:could not load cache.I tried all the solution but without getting any results.Could you please help me. thnak you again
@SparxableTunes
@SparxableTunes 3 жыл бұрын
Stomp the comp!
@Account-fi1cu
@Account-fi1cu 2 жыл бұрын
Hi thank you for this great tutorial, If I have a solution on windows, is it possible to create a makefile using cmake ?
@oneday374
@oneday374 Жыл бұрын
we want you can do a video en the windows version.
@openroomxyz
@openroomxyz 2 жыл бұрын
What cmake does that Visual Studio under windows does not? What is the advantage over using Visual Studio? Correct me if I am wrong but I got the impression that to learn cmake is best not to use IDE and do it under linux, to create your build system? I heard something called premake not sure how are they different?
@mikey.audio.
@mikey.audio. Жыл бұрын
excellent content, thanks!
@JasonKT13
@JasonKT13 Жыл бұрын
What OS are you using here?
@WhiteBerry
@WhiteBerry 2 жыл бұрын
Hi, could you tell me the settings you use for the file path to appear above the first line of the editor? Great video btw
@deryaadil4344
@deryaadil4344 2 жыл бұрын
How can I change the compiler architecture options used by cmake by adding some instructions to the cmake call? Thank you so much!
@thefrostian
@thefrostian 3 жыл бұрын
Fantastic. Thanks so much.
@lowmax4431
@lowmax4431 Жыл бұрын
What terminal emulator is that?
@pygeekrfoo820
@pygeekrfoo820 Жыл бұрын
thank you gilfoyle
@double-lung7364
@double-lung7364 2 жыл бұрын
Thanks for the tutorial! Which distro are you using in this video?
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
This was mx Linux
@aakarshanguptaa2_013
@aakarshanguptaa2_013 3 жыл бұрын
i have three files : main.cpp , header.h and a makefile in the same directory but the "make" command does nothing but rather the command "make main" runs the bash command inside "default:" in the makefile.. what am i doing wrong ?
@milanky
@milanky 3 жыл бұрын
Checkout the Beginner/Intro CMake Course at www.udemy.com/course/master_cmake/?referralCode=D08DF343ABAE2835C3B7
@StevenMartinGuitar
@StevenMartinGuitar 2 жыл бұрын
You missed a big trick, should have turned that light above you on to really sell the OLAS effect
@john3932
@john3932 4 жыл бұрын
Fantastic tutorial Cheers m8
@brno322
@brno322 Жыл бұрын
On Windows I get: g++ main.cpp -o out process_begin: CreateProcess(NULL, g++ main.cpp -o out, ...) failed. make (e=2): The system cannot find the file specified. make: *** [Makefile:2: default] Error 2
@urheart1939
@urheart1939 2 жыл бұрын
should i understand it like Linux shell commands script?
@markharrington5826
@markharrington5826 3 жыл бұрын
Superb thank you
@pebble2258
@pebble2258 2 жыл бұрын
for anyone that is unable to run the 'make' command, run 'cmake --build (build directory)' that's two dashes - -
@ascyrax8507
@ascyrax8507 2 жыл бұрын
thank u.
@juansilicom
@juansilicom Жыл бұрын
why cmake from the build (.) and not from the root and make the destination out/build/? Oo.. I forgot .. there is not standards (now it makes sense) :)
@davidzimmer2156
@davidzimmer2156 Жыл бұрын
I have this same question. Why not cmake from the root? Why cmake from out/build/? Is it bc it "hides" all those cmake files inside of the build/ folder and doesn't clutter the root?
@srh80
@srh80 2 жыл бұрын
Oh great! Gilfoyle got a haircut.
@Jose_Miralles
@Jose_Miralles 3 жыл бұрын
Thanks for the gospel on our lord and savior. It was really helpful.
@aerahtv0000
@aerahtv0000 3 жыл бұрын
Thank you, Zeus! :)
@GfastGao
@GfastGao 3 жыл бұрын
Just tried out with cmake V3.10.0 which apt will gives me, it even do not have the chance to use "-B" properly. I will use snap on ubuntu to install a proper one for the tutorial.
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
Interesting good to know
@muhamedadel5859
@muhamedadel5859 3 жыл бұрын
*Nope, Binaries doesn't build itself,* 15 minutes *well* spent to understand how to build a simple program. I wonder if living things are self built ?. How great he who created all living things, I wonder.?! $ make like.cpp
@kartikgarasia5685
@kartikgarasia5685 2 жыл бұрын
Thanks gilfoil :)
@reflex6588
@reflex6588 2 жыл бұрын
lmao i knew i wasnt the only one that thought this
@kartikgarasia5685
@kartikgarasia5685 2 жыл бұрын
​@@reflex6588 He even speaks in that tone! Which is awesome!
@eneserdogan34
@eneserdogan34 2 жыл бұрын
[ERROR RESOLVED] IF YOU HAVE CMAKE 3.10.2 then run: cmake -Hsourcepath -Bbuildpath yes do it without a space between flag and the argument
@atrus3823
@atrus3823 Жыл бұрын
"rmdir" is a safer way to remove a directory. If you use "rm -fr" and accidentally type the wrong thing... Especially something generic like "build". Perhaps you cd'd to another directory and forgot.
@MilanKarakas
@MilanKarakas 3 жыл бұрын
There is no 'cmake' on Raspberry pi. What then?
@shashikantverma5935
@shashikantverma5935 3 жыл бұрын
Yes.. do a windows video please.
@fouaddlam4688
@fouaddlam4688 Жыл бұрын
I were Learn That's module but i dont't understand you because I Arabic but not probleme ! Next and Good luck
@jerrickmarques8777
@jerrickmarques8777 2 жыл бұрын
cmake makes your makefile for c, say that ten times fast
@peterSobieraj
@peterSobieraj Жыл бұрын
I watched whole video, and I'm not conviced. Why not just create Makefile and use normal make ?
@matsbjnnes366
@matsbjnnes366 Жыл бұрын
As your project grows and you keep adding source files and external libs / includes it's nice to have a single instruction file generate all the neuances neccesary for a makefile. Makefiles can get substantial and messy so it's easier having them automatically generated
@peterSobieraj
@peterSobieraj Жыл бұрын
@@matsbjnnes366 make is tool to automate typing commands related to some project. Purpouse of make is to make programmer work easyer. Cost of using make is that you have to learn new syntax, and that you have to put extra file in your project directory. Other 2 options are to type commands manualy or create script that will run them. Typing commands manualy works fine if you have 1 or 2 files, and don't have any libraries. Buf if you are using any libraries or special compier options, you probably won't remember how to compile it 2 years later. On the other hand writing your own script gives you full power, you can do anything. And you don't need to learn new syntax, because you are using language of your choice. Drowback of your own script is that you need to add code for check modification time, to skip compiling files that were not modificated. Thats about extra 5 lines of code. And running your own script usually take more typing. For example "php make.php" or "node make.js" or "./make.sh", etc. While "make" is short and easy to type. And custom script is custom, so there is no standard way of runing it like "make", "make install", "make clean". Now cmake. From what I know so far. In order to use it you have to also understand Makefile. Because sooner or later something will go wrong, and you will have to investigate. So you need to learn 2 new syntaxes. Complexity +2. In order to run cmake you have to run "cmake -S sources_directory -P output_directory". So practicaly we will write a script for calling a cmake. So we are already makeing custom script for building project. And fact that you have to specify thouse options while cmake is using config file in your working directory to load other options is just stupid. If people think that Makefile are not good, too complicated or something, and they are making new better tool, then why keep depending on Makefile ? If you already have in your memory list of all the commands that need to be run, then why not just execute them ? It look to me, like in every possible case scenario cmake is just worse. I know lot of people is using cmake, so it's likely I'm missing something here. But what ?
@ramakrishnamishra8179
@ramakrishnamishra8179 2 жыл бұрын
Is it possible to compile an exe with this?
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
cmake generates a makefile -> which runs gcc/g++ to compile your code into an executable, linkable library, and can probably do more but those are the main uses
@ramakrishnamishra8179
@ramakrishnamishra8179 2 жыл бұрын
@@CodeTechandTutorials thank you! So we can actually make a universal app with just one set of source?
@CodeTechandTutorials
@CodeTechandTutorials 2 жыл бұрын
@@ramakrishnamishra8179 ah yes, that is the beauty of generators like CMake. It will generate the right compile commands(in a perfect world) for your OS/setup.
@ramakrishnamishra8179
@ramakrishnamishra8179 2 жыл бұрын
@@CodeTechandTutorials thank you! I will try it!
@ShahidNihal
@ShahidNihal 8 ай бұрын
For some reason, you remind me of Gilfolye 😂
@prashanthkumar0
@prashanthkumar0 11 ай бұрын
Aawwww light theme 🙈
@gugu2850
@gugu2850 2 жыл бұрын
Firstly I'am a boy, and secondly, I like him.
@dibyojyotibhattacharjee5349
@dibyojyotibhattacharjee5349 3 жыл бұрын
Did you leave windows, since previously you were a windows user???
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
I use both.
@dibyojyotibhattacharjee5349
@dibyojyotibhattacharjee5349 3 жыл бұрын
@@CodeTechandTutorials okk, what's ur favourite??
@CodeTechandTutorials
@CodeTechandTutorials 3 жыл бұрын
for coding, I prefer Linux. I usually end up on Windows because most of the people who demo or test the software I make use Windows.
@dibyojyotibhattacharjee5349
@dibyojyotibhattacharjee5349 3 жыл бұрын
@@CodeTechandTutorials okk
@saadli
@saadli Жыл бұрын
OurLordAndSavior `touch`es to `make` a file
@tiendadelchavo4132
@tiendadelchavo4132 3 жыл бұрын
Valeu!
@larsgustafsson215
@larsgustafsson215 2 жыл бұрын
Thanks for a good tutorial, but Zeus is spelled Zeus.
@NewtonMD
@NewtonMD Жыл бұрын
Bro uses a light theme? Is he a real coder?
@nono-qv4um
@nono-qv4um Жыл бұрын
no he is not, he is duck typist, writing about ducks
@naamvoornaam6583
@naamvoornaam6583 2 жыл бұрын
C in CMake stands for Christ?
CMake Tutorial EP 2 | Libraries and Subdirectories
17:29
Code, Tech, and Tutorials
Рет қаралды 118 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 787 М.
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН
How To Get Married:   #short
00:22
Jin and Hattie
Рет қаралды 21 МЛН
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 132 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
CMake Tutorial EP 2 | Libraries | Installing | Pairing with Executables | RE-DONE!
36:48
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,6 МЛН
Let's Create a Compiler (Pt.1)
1:11:03
Pixeled
Рет қаралды 523 М.
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
OpenAI’s New ChatGPT: 7 Incredible Capabilities!
6:27
Two Minute Papers
Рет қаралды 194 М.
Why I Don't Like Singletons
29:05
The Cherno
Рет қаралды 66 М.
Somebody emailed me a trojan virus
14:06
Bog
Рет қаралды 791 М.
CMake - the essential package
27:54
Code for yourself
Рет қаралды 10 М.
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН