CMake Tutorial EP 1 | Understanding The Basics

Sdílet
Vložit
  • čas přidán 29. 08. 2024
  • 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.

Komentáře • 242

  • @thibautmodrzyk6215
    @thibautmodrzyk6215 Před 3 lety +62

    Thanks Our sort of long haired Lord And Savior, I'm struggling with the documentation. Having a human explaining really helps

  • @RuoshiWen
    @RuoshiWen Před 11 měsíci +9

    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 Před 3 lety +91

    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

    • @user-fl5zl6ml5b
      @user-fl5zl6ml5b Před 2 lety

      Sorry to interrupt,i am a newer to learn cmake ,is there any tutorial to recommend? Thanks .

    • @openroomxyz
      @openroomxyz Před 2 lety

      @@user-fl5zl6ml5b same :)

  • @Augnos
    @Augnos Před rokem +1

    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

  • @bestganesh
    @bestganesh Před 3 lety +28

    This is a very nice introduction to Cmake. Really got what I need. Thanks :)

  • @journeyman6856
    @journeyman6856 Před 4 lety +13

    The best CMake tutorials on CZcams!

    • @milanky
      @milanky Před 3 lety

      Checkout the Beginner/Intro CMake Course at www.udemy.com/course/master_cmake/?referralCode=D08DF343ABAE2835C3B7

  • @codinger4182
    @codinger4182 Před 3 lety +99

    This guy looks like *_Gilfoyle_* from *Silicon Valley* .
    Jokes apart, he explained great!

  • @cppdog3549
    @cppdog3549 Před 2 lety +3

    I think I just found my favorite CZcams 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.

  • @sirtobi6006
    @sirtobi6006 Před 3 lety +6

    I came to learn about CMake and directly left an abonoment.

  • @mr.bun-bunny8830
    @mr.bun-bunny8830 Před 4 lety +3

    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 Před 4 lety

      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  Před 4 lety

      @@mr.bun-bunny8830 hard to say without many specifics. Can you post the source code?

  • @khaid.5167
    @khaid.5167 Před 3 měsíci

    thank you so much, after 3 years, your video still help alot of ones and companies. it's great.

  • @bieldozap
    @bieldozap Před 4 lety +1

    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  Před 4 lety +1

      Nice! I'm studying hard to make this next cmake tutorial and hopefully take it to a whole new level

  • @inlovewithtajweed1
    @inlovewithtajweed1 Před 3 lety +17

    Thank you for sharing. I enjoyed the content. Minor: zues==>Zeus.

  • @abelashenafi6291
    @abelashenafi6291 Před 5 měsíci

    Thanks man. The shortest yet most efficient and vivid explanation about Cmake and MakeFile. Thanks a lot man. really. Kudos

  • @kavorka8855
    @kavorka8855 Před 7 měsíci

    Simple, clear and fun way of teaching any subject! Now, next ... part 2

  • @ORagnar
    @ORagnar Před 2 lety +1

    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.

  • @juan-jh1qg
    @juan-jh1qg Před 3 lety +3

    In windows, run instead the following CMake command:
    > cmake -S ../../ -B . -G "MinGW Makefiles"

  • @tiendadelchavo4132
    @tiendadelchavo4132 Před 3 lety +9

    These CMake tutorials are simply the best! Amazing explanation and tips! Thank you so much!

  • @anguruso
    @anguruso Před rokem

    Thank you! I had one hell of a time understanding CMake before watching your videos.

  • @blankeyezero
    @blankeyezero Před 6 měsíci

    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...

  • @mittelwelle_531_khz
    @mittelwelle_531_khz Před 2 lety +12

    Having watched 5 minutes only I feel already inclined to comment:
    Being a software developer myself for more than 40 years (so "technically" in retirement now but nevertheless still active) I like your intro: there's no single best practice fitting each every project.
    I also like your dry humor - it doesn't escape me. (I think you know what I mean.)

    • @mittelwelle_531_khz
      @mittelwelle_531_khz Před 2 lety +2

      @Harshil Pandey here's a story of those early days: in some versions of _make_ it was hard-coded that when you used it for the target "love", i.e. you ran it as:
      *make love*
      It responded:
      *not war*

  • @MyMjrox
    @MyMjrox Před 4 měsíci

    Still the best cmake tutorial

  • @aogposton
    @aogposton Před 8 měsíci

    Came to this after doing my own way.... Thank you for the tutorial.

  • @sammyiboi
    @sammyiboi Před 3 lety +19

    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!

  • @ctjanney
    @ctjanney Před 2 lety

    Fantastic! Thank you. I've struggled with make files, hacking open source setups to compile without direction. Thank you for your clear tutorials.

  • @moeroe7663
    @moeroe7663 Před 3 lety +1

    As a C-noob I can say: this is really helpfull!

  • @russellshahenian2357
    @russellshahenian2357 Před rokem

    I love it: 'so just please don't' .... i know your're real at that point. Ty great 'simple' effective.

  • @rsmusic-fh6nl
    @rsmusic-fh6nl Před 5 měsíci

    only legible cmake explanation i've found, tysm

  • @opexkoru5157
    @opexkoru5157 Před 3 lety

    Best cmake tutorial I've seen by far. Looking forward to watching the rest of the videos. Thanks!

  • @LongestYardstick
    @LongestYardstick Před rokem

    this is a late comment, but I really appreciate the series -- using it to familiarize before university class using same build process

  • @huseyink97
    @huseyink97 Před 2 lety +1

    thanks for the best introduction!

  • @charles9571
    @charles9571 Před 2 lety +1

    Thanks, and nice tutorial.
    - A Christian

  • @phillno1751
    @phillno1751 Před 2 lety

    Subscribed. Clear, concise, exactly what I need to get started. I look forward to the next video. Thanks!

  • @sunableflames9365
    @sunableflames9365 Před 3 lety +3

    Thanks a million for this introductory lesson on cmake.Been looking for a clear tutorial and you sir make it crystal clear!! Please keep making the videos.

  • @SeanBoborano
    @SeanBoborano Před 22 dny

    Truly our lord and savior because CMake documentation is just not beginner friendly or should I say TRASH OH MY GODDD MY FRUSTRATION

  • @uwemisrael5836
    @uwemisrael5836 Před rokem

    I'm finiding this series very helpfull. Started learning C++. Thanks

  • @jiangpengli86
    @jiangpengli86 Před 3 měsíci

    Thank you so much for this great tutorial.

  • @leiyin1998
    @leiyin1998 Před 14 dny

    thank you, sir!

  • @gopinath6946
    @gopinath6946 Před 2 lety

    You said No standard in coding.... Thalaiva You are great...

  • @kamiltrzcinski
    @kamiltrzcinski Před rokem +2

    gives off strong 2011 vibes

  • @the_jimnasium
    @the_jimnasium Před rokem

    Thanks a lot for this tutorial. I went to look up how to use cmake and the tutorial in the official cmake documentation was... not great in my opinion. This helped out a ton.

  • @JaCkuevara
    @JaCkuevara Před 2 lety

    Such a funny guy - and a nice intro - keep it going man! Best Regards

  • @xayanmusic3627
    @xayanmusic3627 Před 4 měsíci

    very good tutorial thank you for being so clear

  • @it_raman_suryawanshi1399

    Thank you 😊 for making it easy to understand.

  • @legitjimmyjaylight8409
    @legitjimmyjaylight8409 Před 3 lety +2

    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.

  • @HY-nt8nk
    @HY-nt8nk Před 3 lety +7

    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 Před 2 lety

      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..

  • @degancontent1979
    @degancontent1979 Před rokem

    Good one, looking forward for part 2

  • @user-kt8nc4xd1u
    @user-kt8nc4xd1u Před rokem

    Thanks for creating this video

  • @saulmorales372
    @saulmorales372 Před 3 lety +1

    I appreciate your content and you hella funny!! Thank You Man!!!!!!!

  • @timsessions1845
    @timsessions1845 Před rokem

    Praise be to cmake

  • @eyalpery8470
    @eyalpery8470 Před 3 lety +1

    Excellent! Thanks!

  • @saeidsaati4021
    @saeidsaati4021 Před 3 lety

    This video was great even for me with some experience with cmake, thank you!

  • @davidnguyen9023
    @davidnguyen9023 Před rokem

    Simply great.

  • @qc2217
    @qc2217 Před 3 lety +1

    This is a nice tutorial! Thank you for making it!

  • @DevCurioso
    @DevCurioso Před 3 lety +1

    Great intro to Cmake, congrats

  • @rishabhjain911
    @rishabhjain911 Před 2 lety

    Great job bro
    You just made it a piece of cake
    :)

  • @pdxfunk
    @pdxfunk Před rokem

    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.

  • @Evilanious
    @Evilanious Před 7 měsíci

    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.

  • @mxlodyk
    @mxlodyk Před rokem

    Thank you for this video!

  • @lifeisbeautifu1
    @lifeisbeautifu1 Před 3 lety +1

    Thanks so much for this great tutorial ! :)

  • @moshe22cohen
    @moshe22cohen Před 2 lety

    you are indeed a savior.
    had hard time grasping it and your tutorial made it clear, managed to create cmake and compiling thanks!

  • @MohamadAlajouz
    @MohamadAlajouz Před 2 měsíci

    the ending got me dead 😆

  • @dimitrigraur8345
    @dimitrigraur8345 Před 2 lety

    Great material, subscribed!

  • @mikey.audio.
    @mikey.audio. Před rokem

    excellent content, thanks!

  • @hertzvador2220
    @hertzvador2220 Před 2 lety

    This was very useful. Thank you.

  • @finrei
    @finrei Před 2 lety

    Actually awesome video series

  • @meenamurthy1503
    @meenamurthy1503 Před rokem

    You could say cmake creates a make file, easier ro to associate c with create

  • @xugefu
    @xugefu Před 2 lety

    Thanks!

  • @jasonwell5299
    @jasonwell5299 Před 3 lety

    Gorgeous video bro.

  • @8Trails50
    @8Trails50 Před 2 lety

    I wish all tutorials were like this

  • @mupmuptv
    @mupmuptv Před 3 lety

    Thank you. You are the best

  • @akashgillella
    @akashgillella Před 2 lety

    Very nice tutorial. Really funny 2! Thanks

  • @77and619
    @77and619 Před 3 lety

    cool guy and gets to the point ! not always like this! tyvm

  • @katjordansoccer
    @katjordansoccer Před 11 měsíci +1

    Zeus, not Zues, but otherwise really well done. Thanks!

  • @avinashmehtadelhi
    @avinashmehtadelhi Před 2 lety

    Great video, many thanks. Would be great if u can plan a playlist on configure make and make install. 👍

  • @B15HOP
    @B15HOP Před 3 lety +18

    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.

  • @thefrostian
    @thefrostian Před 3 lety

    Fantastic. Thanks so much.

  • @eneserdogan34
    @eneserdogan34 Před 2 lety

    [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

  • @ascyrax8507
    @ascyrax8507 Před 2 lety

    thank u.

  • @pygeekrfoo820
    @pygeekrfoo820 Před rokem

    thank you gilfoyle

  • @pebble2258
    @pebble2258 Před 2 lety

    for anyone that is unable to run the 'make' command, run 'cmake --build (build directory)' that's two dashes - -

  • @motsyrhc7436
    @motsyrhc7436 Před rokem

    thank you kind sir. this is the most concise video on CMake I've seen so far.

  • @StevenMartinGuitar
    @StevenMartinGuitar Před 2 lety

    You missed a big trick, should have turned that light above you on to really sell the OLAS effect

  • @markharrington5826
    @markharrington5826 Před 3 lety

    Superb thank you

  • @DanRed-bc3ug
    @DanRed-bc3ug Před rokem

    Thank you so much!
    I also liked the terminal, what is it?

  • @SparxableTunes
    @SparxableTunes Před 3 lety +1

    Stomp the comp!

  • @magicomiralles
    @magicomiralles Před 3 lety +2

    Thanks for the gospel on our lord and savior.
    It was really helpful.

  • @openroomxyz
    @openroomxyz Před 2 lety

    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?

  • @john3932
    @john3932 Před 3 lety

    Fantastic tutorial
    Cheers m8

  • @AdityaDendukuri
    @AdityaDendukuri Před 3 lety

    Great video! Could you explain more why do you build in ./out/build instead of ./build?

    • @CodeTechandTutorials
      @CodeTechandTutorials  Před 3 lety +1

      At the time, it was because if you let Visual Studio configure your cmake project, it uses out/build Nowadays I went back to just ./build

  • @davenarisotto3674
    @davenarisotto3674 Před 2 lety +1

    There's one thing I can't seem to understand: does cmake substitute normal compilation and execution with g++?
    For example: usually whenever i start programming a new project, i write the code, then i use g++ to compile the whole project and then i run the outputted executable.
    Does cmake substitute this process?

    • @ItsSunnyMonster
      @ItsSunnyMonster Před 2 lety +1

      CMake only generates project files for each compiler/platform. If you use Windows and Visual Studio, you can use CMake to generate Visual Studio solution files. If you use Mac and XCode you can use CMake to generate XCode projects, etc etc. This is very convenient because you just need to write the CMake lists files and have CMake generate project files on all platforms so you can compile the generated projects. Hope that answers your question.

  • @atrus3823
    @atrus3823 Před rokem

    "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.

  • @srh80
    @srh80 Před rokem

    Oh great! Gilfoyle got a haircut.

  • @justdoingodswork
    @justdoingodswork Před rokem

    I tried to make a makefile, but terminal is not reconizing command make?

  • @vinniciusrosa8284
    @vinniciusrosa8284 Před 7 měsíci

    How can I change the compiler to MingW? I tried a lot of things and I did not found the answer through the internet. :(

  • @enveraaa8414
    @enveraaa8414 Před 2 lety

    Thanks

  • @codutyapexpredator1548
    @codutyapexpredator1548 Před 5 měsíci

    I think I stumbled into the real life Gilfoy. 😂😂😂

  • @lyndazaid9560
    @lyndazaid9560 Před rokem

    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

  • @oneday374
    @oneday374 Před rokem

    we want you can do a video en the windows version.

  • @Account-fi1cu
    @Account-fi1cu Před 2 lety

    Hi thank you for this great tutorial,
    If I have a solution on windows, is it possible to create a makefile using cmake ?