CMake Tutorial for Absolute Beginners - From GCC to CMake including Make and Ninja

  Рет қаралды 28,029

Gary Explains

Gary Explains

Күн бұрын

Пікірлер: 137
@vatsalpandya5415
@vatsalpandya5415 16 күн бұрын
The most perfect tutorial on cmake and make. It rightly takes half of a video to build up to the requirement of the tool.
@muddyexport5639
@muddyexport5639 Ай бұрын
Used it and others w/ 42 yrs as programmer, analysry manager, director , and now, retired from code for a living to code for fun. It always was fun - they paid me to have fun!!!.
@lorinczhuff2022
@lorinczhuff2022 Ай бұрын
I know how to write C programs, but I've always had big training wheels. As I started to dig deeper, I've come across the term Cmake, but never had a clue what it was. Thank you for your clear introduction.
@markrobinson2648
@markrobinson2648 Ай бұрын
Long time C# developer but doing some c/c++ as a hobby. This is the best make/cmake introduction I have seen, thanks!
@bartdemeulmeester4662
@bartdemeulmeester4662 Ай бұрын
Thanks Gary, make was a bit of a mystery to me this really sorted it out.
@djpenton779
@djpenton779 Ай бұрын
Very useful, thanks! I have been retired for years now, but made my living as a software developer for decades. I wrote almost entirely in C, and worked on projects that required a lot of effort to construct and maintain the makefile. In recent years I began returned to programming as a hobby, including tinkering with MCUs. When I discovered that CMake is now a thing, I was quite daunted. Oh no - another meta level of build system to learn. So I avoided it. But I guess it's time to bite the bullet and learn it, because I have pretty much hit the limit with arduino IDE. So once again , thanks for this intro to CMake.
@toby9999
@toby9999 Ай бұрын
I have been using C and C++ since the 90s and have never touched a make file. It's just such an archaic concept when we have automation tools. Can you imagine constructing a make file for a project with 10,000 files? Thing is, CMake is also pretty bad. I've literally spent days trying to get CMake working.
@GaryExplains
@GaryExplains Ай бұрын
@toby9999 Interesting comment. How did you build projects with 10,000 files without a build system?
@djpenton779
@djpenton779 Ай бұрын
@@GaryExplains My last job as a software guy was for a company in Calgary, Alberta. This was an ill-fated (an ill-conceived) effort to produce a message-passing based operating system, and ALL of the application layers on top of it, to implement large scale SCADA systems. I came to the company late in the game, and became something of a Cassandra because it quickly became obvious to me that the basic structure of the software was completely unworkable. (Imagine a software team of 20 people trying to implement linux, X11, the Chrome browser, and all the glue as one monolithic system. Nope....) IIRC, the software - from the lowest hardware level up - was built using make, and a dauntingly complicated makefile. Coding and maintaining this alone was a major effort. At that time in my career I had never heard of CMake, and don't actually know whether it existed. This build strategy was in microcosm representative of the project's design flaws, but was not its biggest flaw.
@frankleonhardt3337
@frankleonhardt3337 Ай бұрын
(Useful tip in last paragraph) I've been using make since System V but have wondered about cmake. This was a great explanation, as the man pages are, well, long and don't encourage reading. I'm not convinced, as make is quick to set up for small/medium projects (default rules). What's always been tricky (for over 40 years) is knowing what the dependencies are in order to define the rules! Clang/LLVM (and I think gcc) has the -M option that can list the dependencies in Makefile format, but not cmake. And it's not in the standard man page! Just run cc -M test.c (or whatever) and it'll list what goes in to making it. -MM is the same, but without header files.
@talideon
@talideon 21 күн бұрын
cmake is best compared to GNU Auto tools, mind.
@hiankun
@hiankun Ай бұрын
All the great content are free and I have nothing to complain. But (sorry) this other than some AI stuff is what I have expected from Gary. Thank you for the effort. The explanation was crystal clear!
@nashaut7635
@nashaut7635 Ай бұрын
👍 Fun fact: GNU make provides a (huge) set of default rules. If the executable is made of a single source file (not limited to C or C++) then you don't need a Makefile at all. Just run "make hellow". The executable base name must be that of the source file, it's the only requirement. More precisely, the executable name is derived from the source base name.
@rajmajumdar5253
@rajmajumdar5253 Ай бұрын
Wait what really?
@nashaut7635
@nashaut7635 Ай бұрын
@@rajmajumdar5253 Yup. Just try it. Note that default flags will be used unless you pass them to make or via the environment. Example: `make CFLAGS=-Os -Wall hellow`.
@windysynth
@windysynth 4 күн бұрын
I wish I had watched this first! My first look at cmake was to build opencv on widows--not for the faint of heart. This video gave me the overview I needed. Thanks so much!
@GaryExplains
@GaryExplains 4 күн бұрын
I'm glad you found it helpful!
@mohitsethi3509
@mohitsethi3509 9 күн бұрын
THIS IS THE VIDEDO !!!! THIS IS IT.
@bertblankenstein3738
@bertblankenstein3738 Ай бұрын
In addition to not having to type and tell gcc to compile all the files by using make/cmake, you also avoid recompiling items that were not updated/touched since the last time they were compiled. This saves a lot of computer time and was probably more important in the good old days.
@HyyskanPolttaja
@HyyskanPolttaja Ай бұрын
Thank you Gary. Please continue explaining Cmake further. BTW, the random example gives the same result every time. Even on my computer I get the same sequence [ 0.767554, 1.104780, 1.069596, 1.084488, 0.245279 ,0.580639, 0.292428, 1.135251, 0.902894, 0.226394 ] . Not very random... 😁
@GaryExplains
@GaryExplains Ай бұрын
As with all Pseudo-Random Number Generators (PRNGs), they just use a mathematical algorithms to generate numbers. Without providing a seed (which this program doesn't do) then they will always generate the same sequences.
@zorabixun
@zorabixun Ай бұрын
Gary, that is strange, why is that implemented if resulting the same effect 🙉 .. when i started computing on ZX81 it was very good random numbers generator, we were doing tests with colours, or symbols, Later on, i was using Atari 520 ST, and it was lighting fast with numbers never repeated .. I'm missing these computers, so romantic times, exciting and i was soooo happy to exchange software listings with friends to see results, testing days, and days, sorting programs, etc 🌞 On ATARI 520-ST compilers GFA-Basic ultra fast, objective, Pascal, Mark Williams C compiler with a system like Linux .. Thanks 🎉
@GaryExplains
@GaryExplains Ай бұрын
The program isn't the important thing here, but the build system. As I mentioned to the OP, a seed needs to be provided to every PRNG. On many systems (but not all) the seed is automatically set on the first call to get a random number, the seed is often based on the current time and therefore different every time the program runs.
@rmfeld
@rmfeld Ай бұрын
@@zorabixun It can sometimes be helpful to generate a random but repeatable sequence of numbers to have the same conditions on every run. Therefore delivering the seed to the random number generator is an extra and depending on your application optional step.
@ElectronicFanArm
@ElectronicFanArm Ай бұрын
Loved this thanks Gary for sharing ❤
@GaryExplains
@GaryExplains Ай бұрын
Glad you enjoyed it
@RocktCityTim
@RocktCityTim Ай бұрын
Thanks, Gary. This is outstanding - this saves me days of explaining CMake for new hires. How about a similar look at the GNU autotools? There are still loads of projects using them.
@philb1466
@philb1466 Ай бұрын
As an absolute beginner this video was very useful and informative! Thank you!
@GaryExplains
@GaryExplains Ай бұрын
Glad it was helpful!
@drfrancintosh
@drfrancintosh Ай бұрын
wonderful video! I really need an introduction to CMAKE… I do think you glossed over the biggest feature of make and make files… And that is it understands when a file has been touched or modified and only compiles the things it needs to in order to generate the output… It does this by comparing the timestamps on the file modification time… Great video I've been long time subscriber your explainers are the best keep doing what you're doing! And continue to success!
@OmidAtaollahi
@OmidAtaollahi Ай бұрын
watched a few times. enjoyed the simpilicity and clarity in your tutorials.❤❤ It feels good learning with gary
@GaryExplains
@GaryExplains Ай бұрын
Awesome! Thank you!
@gregholloway2656
@gregholloway2656 Ай бұрын
Great video Gary, it is appreciated! If you make a followup video, could you explain a little about what those other cmake files are in the build directory? And of course, a bit more about the options in the CMakeLists.txt file. 👍
@djsbriscoe
@djsbriscoe Ай бұрын
Thanks. Could you do a similar beginners guide to setting up your first github/gitlab project on a home network NAS or local hard drive? Or maybe you've already covered this?
@interweb3401
@interweb3401 21 күн бұрын
Perfect explanation for beginners.
@jonathandawson3091
@jonathandawson3091 Ай бұрын
Despite having used cmake many times, I learnt a few things. For example I did not even know CMake is for Crossplatform Make. Also the examples for more complicated Makefile were top notch where the interested person could look up or just understand looking at it (e.g. %.o: %.c). Absolutely amazing video, always so pleasant to watch Gary's videos.
@robby3467
@robby3467 Ай бұрын
That's mostly how we use it... to create project files for MS Visual Studio when importing an open source library. But it sucks. It does an awful job of it, and that's only with a lot of luck. Mostly it just fails with errors. And as I commented somewhere else, it always fills the source tree with absolute paths. Terrible idea. The documentation is also shocking.
@jonathandawson3091
@jonathandawson3091 Ай бұрын
@@robby3467 Yeah. CMakeLists.txt name is also weird. I still don't know what PRIVATE does. Things like add dependencies are given after add_executable which is weird. I think it grew out of some person who just hacked something quickly to suit his needs. I don't think it's the best, but unfortunately it has become standard. Maybe the best way to dethrone it is to go one step up and now make a CMakeLists.txt generator with a saner syntax.
@roysigurdkarlsbakk3842
@roysigurdkarlsbakk3842 Ай бұрын
Very nice - thanks!
@RoboticsDIY
@RoboticsDIY Ай бұрын
Thank you, this video is very much appreciated. I have some programming background - I learnt Borland Pascal in school and in first course at university... have done a tiny bit of PHP and JavaScript, some small projects on Arduino. But since I moved to work in UK... I have in a way wasted 10 years doing manual labour jobs. I want to move back to electronics and programming, I'm slowly working on starting my KZbin channel. I have wanted to learn C/C++ and need it for electronics projects, and especially now with Raspberry, I have to learn how to compile programs from source on Linux. So I have heard about GCC, have some rough idea about it all, but this video is a conspectus of how to say - missing peaces to link it all together.
@bertblankenstein3738
@bertblankenstein3738 Ай бұрын
Thank you. This is good info. I can compile basic projects, and used make 30 y ago and have forgotten the bit I knew then. This will certainly help.
@dabdoube92
@dabdoube92 Ай бұрын
I love this back to basics series. Gary is great again !
@jecelassumpcaojr890
@jecelassumpcaojr890 Ай бұрын
A key difference between a build system like make and a shell script is what you illustrated at the end by deleting a few lines from "random.h": make compares the dates of any files it knows how to generate with the dates of the files that depends on and only runs the rules if the generated file is older. A shell script would run all the rules every time. Some viewers might have missed that when you edited "random.h" make ran the rules to generate "random.o" and "main" but not the rule to generate "main.o" since that was newer than "main.c"
@henrikoldcorn
@henrikoldcorn Ай бұрын
This video seems to be approaching optimum for explaining these tools! Good length, depth and clarity, like a glass dild… Seriously though, it’s great.
@animalshorts4377
@animalshorts4377 Ай бұрын
Thank you!
@GaryExplains
@GaryExplains Ай бұрын
You're welcome!
@kev2020-z9s
@kev2020-z9s Ай бұрын
Thank you for your excellent explanation keep up the great work.
@GaryExplains
@GaryExplains Ай бұрын
Glad it was helpful!
@NotMarkKnopfler
@NotMarkKnopfler Ай бұрын
This is very useful. Is CMAKE installed on Linux by default or do we need to download it? 👍
@Colaholiker
@Colaholiker Ай бұрын
That likely depends on the distribution you are using. But if it isn't installed yet and you use anything that traces back to Debian, a sudo apt install cmake will fix that for you. I would think that pretty much any modern distribution at least has it available in their repository.
@andrew121410
@andrew121410 Ай бұрын
Thank you, I was always confused about the difference between GCC & Make & CMake but this explains everything. I do hope one day C & C++ will get a default package manager like with Java you have maven and gradle so easy to use both.
@GaryExplains
@GaryExplains Ай бұрын
Glad it was helpful!
@toby9999
@toby9999 Ай бұрын
I use MS Visual Studio on Windows 99.9999% of the time. It does all of that stuff for you and way more. It even integrates Clang / LLVM for those who don't like MSVC. If you rename a file or add a file, it'll automatically handle that, etc.
@sumitkamble_
@sumitkamble_ 10 күн бұрын
clean and clear explanation
@GaryExplains
@GaryExplains 10 күн бұрын
Glad you found it helpful!
@andrewgrant788
@andrewgrant788 Ай бұрын
Ninja is the way to go with CMake. It works on Windows and MacOS as well as Linux.
@ezrakoper
@ezrakoper Ай бұрын
Thanks. Very useful
@mohsenzare2511
@mohsenzare2511 29 күн бұрын
Nice video! consider also go to more advance stuff about cmake! like variables or if statement and ...
@cdkslakkend5742
@cdkslakkend5742 Ай бұрын
You see, this is what makes Linux interesting as opposed to the other OS's and their tools. At least, you can then go to another level and start looking at other types of source files that make up smaller linux programs and learn how the build process proceeds so that installing from source has a more meaningful impact in terms of comprehension.
@GaryExplains
@GaryExplains Ай бұрын
I get your point and I agree, but technically it isn't Linux that makes this possible, but open source in general. For example, you can look at and compile and install htop on macOS or FreeBSD.
@karolkotula9279
@karolkotula9279 15 күн бұрын
Thanks Gary for great tutorial :) Small contribution from myself: if you want to use cmake for your Visual Studio compiler, then: 1. cmake in your build_vs subdirectory, with command: cmake -G "Visual Studio 17 2022" .. 2. build created solution with msbuild: MSBuild.exe hellow.sln -p:Configuration=Release
@bookappointmenio
@bookappointmenio Ай бұрын
Thank you well explained 💌
@grahamm7408
@grahamm7408 Ай бұрын
Awesome intro! Next stop, the Linux kernel 😅
@behrampatel4872
@behrampatel4872 Ай бұрын
This is such an approachable tutorial. Thank you for Making this ;) Edit 01 - This is probably the best C-make for beginners tutorial out there. Full stop. End Edit 01 I had one question. Just like random.h which needs to be compiled , the Math.h is also a header file. So why did we need to link against that instead of also compiling that header ? Thanks,
@GaryExplains
@GaryExplains Ай бұрын
The functions defined on math.h are not part of the standard C library, so you need to link again libm explicitly. So I am not linking against the header but to the library that has the functions defined in the header.
@behrampatel4872
@behrampatel4872 Ай бұрын
@@GaryExplains got it. Thanks for the clarification. Just FYI i'm here because I want to integrate a plugin for Unreal Engine . Specifically to integrate a recent version of OpenCV. All documentation & videos on the topic are years old so it's become difficult. So this kind of knowledge (building from source, DLL etc ) is very essential. Thanks and god speed.
@harrypehkonen
@harrypehkonen Ай бұрын
This morning, I bumped into CMake and started looking into learning enough about it to be able to use it, but then I was distracted by the build system for Zig.
@manishgautam2424
@manishgautam2424 Ай бұрын
loves to see it
@dragonfly-7
@dragonfly-7 Ай бұрын
Hey Gary, thanks for your great contribution ! One question: In the video you did mention several times Visual Studio but you did not explicitly mention "Visual Studio Code" or vscode. What about this environment ?
@nameless5724
@nameless5724 Ай бұрын
Thank You for sharing.
@tushar8133
@tushar8133 Ай бұрын
Excellent!
@alexwright6038
@alexwright6038 Ай бұрын
Thank you, a good starting point for a beginner. I learnt to use Borland Turbo Pascal, that was my language of choice. I mainly work with hardware, I need to get more used to software tools. Do you gave an example of using VS code to program a pi pico in C/c++?
@byronwatkins2565
@byronwatkins2565 Ай бұрын
How do we organize larger projects? Most projects have trees of directories filled with files and a single config/make sequence to compile them all.
@toby9999
@toby9999 Ай бұрын
One of the projects I work on has 6000 folders and 90,000 files. There's no way I'd be using a toy-like utility like CMake for that, and we don't.
@Colaholiker
@Colaholiker Ай бұрын
The way i do it is to setup directories for everything that makes sense to go together, and then each directory gets its own CMakeLists.txt to build a library out of these files, and the main CMakeLists.txt includes all the directories ti get those files to be active and links the libraries I have created. (I do embedded work, we can't have dynamic/shared libraries, all needs to be statically linked)
@negart7744
@negart7744 26 күн бұрын
Thanks for tge video. I wanna use cmake for cmocka.
@grimvian
@grimvian 18 күн бұрын
Interesting but with my clumsy fingers and weird dyslectic issues I'm using an IDE with all the settings I need. I never understood why many prefer to write instead of clicking on a button. I'm also using pragma once.
@mohitsethi-w7k
@mohitsethi-w7k 9 күн бұрын
FOLKS THIS IS THE VIDEO, DONT GO SEARCHING ANYMORE.
@Xenthera
@Xenthera Ай бұрын
Nice Rush video length
@gurusunu1105
@gurusunu1105 Ай бұрын
Thanks 👍
@guilherme5094
@guilherme5094 Ай бұрын
👍👍Thanks sir!
@An.Individual
@An.Individual Ай бұрын
How do you get around the fact that we didn't create random.h in the 2nd demo?
@GaryExplains
@GaryExplains Ай бұрын
I don't understand. What do you mean?
@An.Individual
@An.Individual Ай бұрын
@@GaryExplains 2:44 2nd line is #include "random.h" so the compiler will try to open a file called random.h which we didn't create ?
@GaryExplains
@GaryExplains Ай бұрын
I did create it, I just didn't show it. It is the same random.h file I show later in the video.
@negart7744
@negart7744 26 күн бұрын
@4:25 thanks for the video ❤ why don't we have math.o same as other two. Why is it -lm? What makes math lib and random lib different?
@GaryExplains
@GaryExplains 26 күн бұрын
Random lib is made by us, math lib is provided by the system.
@svenvandevelde1
@svenvandevelde1 Ай бұрын
Thank you
@GaryExplains
@GaryExplains Ай бұрын
You're welcome
@mahmoud1737
@mahmoud1737 26 күн бұрын
what about zig and opinion on as a c compiler drop in replacement
@GaryExplains
@GaryExplains 26 күн бұрын
I did a video on that.
@abiuniverse
@abiuniverse Ай бұрын
Does it also work with Fortran
@JamesTJoseph
@JamesTJoseph Ай бұрын
The best book to learn CMake is “Professional CMake by Craig Scott”.
@robby3467
@robby3467 Ай бұрын
"Professional" and "CMake" should never go together is one sentence :)
@JamesTJoseph
@JamesTJoseph Ай бұрын
@@robby3467 apparently it is the best book with free new editions 😌
@talideon
@talideon 21 күн бұрын
​@@robby3467Better than Autotools hell though, however bad the CMake language itself is. I'd use Meson for builds if I could, if only because it's less crufty.
@simonbooth4888
@simonbooth4888 Ай бұрын
No external library linking explanation which is the most confusing bit when using third patry add-ons. i.e. need a follow up
@GaryExplains
@GaryExplains Ай бұрын
External library like libm?
@simonbooth4888
@simonbooth4888 Ай бұрын
@@GaryExplains External libraries like display drivers on a pico
@talideon
@talideon 21 күн бұрын
​@@simonbooth4888That's a matter of how those third party libraries are installed as part of the project. If the complier doesn't need -I and -L to find the headers and library binaries, it's no different from linking to libm. If they provide pkg-config files, there's find_package(PkgConfig), which gives you the pkg_check_modules(...) command to discover the paths and compile flags. If cmake knows about the library in question, it has other ways (I'm typing on a phone, so can't recall the commands off the top of my head). If it's a vendored library, then your root CMakeLists.txt should pull in the vendored library as another target. Dealing with vendored libraries is really something that would be covered as part of a video on project organisation, though.
@talideon
@talideon 21 күн бұрын
If you want a more in depth explanation, "Modern CMake with C++" is a good choice.
@irlshrek
@irlshrek Ай бұрын
I went Rust and never looked back
@robby3467
@robby3467 Ай бұрын
I tried Rust and I did look back.
@fdfgsa
@fdfgsa Ай бұрын
CMake is one of the reasons I now use Rust
@robby3467
@robby3467 Ай бұрын
CMake sucks, right? We found it always filled the source tree with absolute paths. There should be a way to create relative paths but could never find anything that worked.
@4k1ra-f9y
@4k1ra-f9y Ай бұрын
I'm so confused how cmake work on raspberry pi pico
@h_pranav_nayak
@h_pranav_nayak Ай бұрын
It doesn't "work" on the pico You cross compile code on your PC and then flash the binaries on the pico
@4k1ra-f9y
@4k1ra-f9y Ай бұрын
@@h_pranav_nayak its working when I trying flash the led, but I'm so confused how to setup cmakelist.txt for my environment, actually i want someone teaching how cmakelist.txt work on raspberry pi pico, how to setup the directory, i have many of problem how to setup the lib on cmakelist...I ready done to add lib on cmakelist code, but when try to running, the error showing "lib not found", and i try search use "locate lib" it shows the existence of the library
@fuzzyheadedfreak
@fuzzyheadedfreak 9 күн бұрын
Why numbers not random?
@GaryExplains
@GaryExplains 9 күн бұрын
It is a pseudo random number generator. All pseudo random number generators create the same sequence until the "seed" is changed.
@fuzzyheadedfreak
@fuzzyheadedfreak 8 күн бұрын
@@GaryExplains Groovy, thanks.
@BangkokBubonaglia
@BangkokBubonaglia Ай бұрын
Thanks for this series Gary. A request. Please do a video on how to control all the make flags using cmake. For instance, I hate that cmake always hides the real gcc compile commands. I absolutely loathe that. I want to see the 1000 character long actual gcc commands as they are executed. How do I force cmake NOT to hide that?. It builds this complex structure of hierarchical Makefiles, and I never know how any code is actually being built. The options to cmake are where all the utility lies. As someone who grew up on make, it is incredibly frustrating not to be able to see what is happening when I compile a project.
@Colaholiker
@Colaholiker Ай бұрын
There is an option to control CMake's verbosity (and of course the verbosity of the output it produces. I don't remember what it is, as I only tried it once and didn't really see the benefit over a mostly silent build that only shows warnings and errors (or in my usual project setup only errors since I treat warnings as errors and set my compiler to nag a lot). I found it easily when I googled for it. So if you prefer to see tons of text scroll by, CMake has got you covered. 😉 I am not saying that either of the two is better, I think this is mostly a matter of personal preference.
@mikechappell4156
@mikechappell4156 Ай бұрын
What was random.h? You included it, but never showed it.
@GaryExplains
@GaryExplains Ай бұрын
I do show it, but later in the video when I demonstrate what the build system does when you change a files it is just a declaration for the random function. 1 line of code.
@mikechappell4156
@mikechappell4156 Ай бұрын
@@GaryExplains Thanks. I saw when I finished the video. I just initially got the compile error for the missing file, but it was easy enough to dummy something in until you exposed it.
@michelealessandrini3421
@michelealessandrini3421 Ай бұрын
Can you possibly cram more ads in your videos?
@GaryExplains
@GaryExplains Ай бұрын
Eh? I don't cram in the ads, Google does that and it is automatic. Yes, I enable ads, but after that it is all Google, not me.
@michelealessandrini3421
@michelealessandrini3421 Ай бұрын
@@GaryExplains I had to see a dozen ads in a 20 min video, stopping every couple of minutes, ok that you deserve a revenue for your work, but over a certain limit I'm no longer motivated in following a youtuber.
@GaryExplains
@GaryExplains Ай бұрын
I understand. But as I said it is Google that picks how many ads are shown and where. Not me. Remember that Google gets a much larger fraction of the advert revenue than the video creator. Your beef is with Google, not me.
@weiSane
@weiSane Ай бұрын
Cmake is such a pathetic messy build tool. No wonder a lot of beginners get overwhelmed when trying to learn C++ and they just go for much more newer better fleshed out languages with far much better build tools. We have to be thankful though because the languages that came after learned from mistakes made by the earlier ones.
@tushar8133
@tushar8133 Ай бұрын
fatal error: 'random.h' file not found I have main.c and random.c in the directory Ether I run this command - gcc -c main.c Or this command - gcc -o main main.c random.c -lm Both are giving same error.
@GaryExplains
@GaryExplains Ай бұрын
You need random.h as well. I show it at one point in the video. It is just a header for that random function.
@jussiheino
@jussiheino Ай бұрын
I will unsubscribe if you don't change the "demo"-intermission jingle! I would be deaf if wearing headphones. Super loud on my laptop speakers. Otherwise, good cover of basics! liked!
@toby9999
@toby9999 Ай бұрын
Sorry to be so blunt, but CMake is an absolute piece of garbage (in my opinion). I've spent too many hours, if not days, tearing my hair out or turning it grey, trying to beat CMake into submission. Worst piece of build tooling I've had the misfortune of meeting in over 25 years of software development. It never works out of the box. It's a piece of crap. Even watching this video... I feel the stress. Sorry, but I just had to vent. Is this really the best the open source community can do? It's still an archaic process. This is 2024. That said, you provided a nice overview.
@andrewgrant788
@andrewgrant788 Ай бұрын
Don’t agree at all. CMake is an excellent build tool compared to alternatives like GNU autotools. The CMake team works with the major C++ compiler teams and Microsoft’s cross platform tools in Visual Studio rely on CMake. They also have a package manager vcpkg which integrates with CMake. That said, in my view the best IDE for working with CMake is CLion from JetBrains. If you wish to avoid hair loss it is the best option, the integrated CMake debugger is excellent.
@var67
@var67 Ай бұрын
What's the alternative, do you use Meson? Can you give a specific example where Meson, or another system, works better for you than Cmake? (I have no experience with Meson and not much with Cmake.)
@arkeynserhayn8370
@arkeynserhayn8370 Ай бұрын
Can you please provide reasons of why you think this way? For one i see people complain about it's scripting sytanx, and even while its true, it's not a huge deal for me; what else do you think is wrong with cmake?
@talideon
@talideon 21 күн бұрын
You haven't been subjected to the hell that is GNU Autotools, then?
@briman113
@briman113 Ай бұрын
🙏👍
8 Data Structures Every Programmer Should Know
17:09
ForrestKnight
Рет қаралды 172 М.
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 5 МЛН
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 6 МЛН
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 48 МЛН
How to: Modern CMAKE
28:06
Practical Software
Рет қаралды 3,5 М.
CMake основы
12:46
S0ER
Рет қаралды 50 М.
How a Microcontroller starts
28:49
Artful Bytes
Рет қаралды 45 М.
Best KDE Linux Distro - As We Hurtle Towards 2025
19:24
Gary Explains
Рет қаралды 14 М.
Introduction to CMake Crash Course
14:08
PunchedTape
Рет қаралды 23 М.
CMake - the essential package
27:54
Code for yourself
Рет қаралды 12 М.
The 3 Laws of Writing Readable Code
5:28
Kantan Coding
Рет қаралды 729 М.
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 5 МЛН