This is a great, simplified CMake tutorial. Highly recommended for all C++ developers who need to get a flavour of CMake in half an hour.
@Gornius3 жыл бұрын
Simple, quick, knowledge-packed, easy to understand and to follow tutorial. I went from complete magic to understanding CMakeLists in 30 minutes! Thanks a lot!
@iLeno2 жыл бұрын
This is the best video on C++ by far, every other people just run into coding, but no one actually takes the time to explain how to compile and automate the compilation of your projects. Very well done.
@gabrielgardin25923 жыл бұрын
Very loud keyboard. But great video!
@hotmandead12 жыл бұрын
True mechanical
@polisbaba2 жыл бұрын
@@hotmandead1 What is your keyboard?
@hotmandead12 жыл бұрын
@@polisbaba keychron Q1
@raulcardona.2 жыл бұрын
Amazing video! Love the keyboard ASMR
@peacemode25743 жыл бұрын
Best tutorial of Cmake for beginners on YT I'm not exaggerating.
@NordinDeveloper7 ай бұрын
Perfect tutorial! You cover all the stuff a programmer wants to know in a very short and clear manner.
@ancientstraits92882 жыл бұрын
I still come back to this tutorial whenever I have to setup a new CMake project.
@TheHenkrik2 жыл бұрын
Really, really good tutorial! Great explanations, easy-to-follow and yet you still manage to add enough detail that one can imagine how to begin to scale this up beyond simple "hello world"-style projects. Thank you.
@lahianmoronta86982 жыл бұрын
Okay this is actually really helpfull. just added a project name to a txt file that didn't work but now it does, does take a bit before you understand but its actually pretty easy.
@newsgo1876 Жыл бұрын
Thank you so much!!! Finally I can understand the CMake rather than call it fxxking-but-cant-get-rid-of magic.
@ankit142453 жыл бұрын
This is the best CMake tutorial and the best part it is in Linux. Waiting for the next parts eagerly. It would be great, if you create content on - creating subdirectories using CMake, git, CDash and CTest.
@Roule_n_Scratche2 жыл бұрын
Thanks for putting chapters, its very useful
@Franfran722 Жыл бұрын
Thé only cmake tutorial that really helped me
@sonyerric22 жыл бұрын
what is the command that clears up the clutter at 4:11 ?
@StannyObelisk3 жыл бұрын
This is scrumptious. Thank you :)
@Kay-bm3xs3 жыл бұрын
I think it's a great video but I can't follow your commands at all if I'm new to all this stuff.
@xxbomelxx8742 жыл бұрын
WTF, why is this better that than the original c++ tutorial?? 😅
@mrqwakgames Жыл бұрын
Where's the donate button to get this guy a quiet keyboard?! ;)
@mrqwakgames Жыл бұрын
(great tutorial btw)
@why19782 жыл бұрын
Excellent tutorial , keep those keys clicking
@ihebmzoughi48412 жыл бұрын
the best
@ihabhatim58252 ай бұрын
cmake . does not generate a makefile in windows, why?
@tunacici2 жыл бұрын
Thanks for amazing video. Helped a lot
@ItsNotAllRainbows_and_Unicorns2 жыл бұрын
Hmm, I am using ubuntu and the part @4:27 with cmake ../ did not work for me.
@helium735 ай бұрын
I'm able to make Makefiles that work but not with cmake. When I tried using cmake it generated a huge ugly makefile that didn't work.
@zitronenfresser70892 жыл бұрын
Unfortunately your vim plugin does not work and i have no idea why
@07ucs0513 жыл бұрын
I am stuck with this error when I try to use find_package() for SFML. By not providing "FindSFML.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "SFML", but CMake did not find one. Could not find a package configuration file provided by "SFML" (requested version 2) with any of the following names: SFMLConfig.cmake sfml-config.cmake Add the installation prefix of "SFML" to CMAKE_PREFIX_PATH or set "SFML_DIR" to a directory containing one of the above files. If "SFML" provides a separate development package or SDK, be sure it has been installed. What should I do next? In which files I should make changes? It would be very much helpful if you could help me with this error. I am using Deb(Ubuntu).
@DjSt3rios Жыл бұрын
Great video, thank you so much for sharing your knowledge! You got a new sub 🙂
@andychess2 жыл бұрын
Excellent video thank you very much!
@amitozazad15843 жыл бұрын
Great explanation!
@fran126592 жыл бұрын
very nice video thanks for sharing. PS: Your keyboard is quite loud for the voice volume.
@Engineer2261 Жыл бұрын
I have target_sources in my example cmake file whereas you use add_executable. Which one is recommended?
@lainarte3 жыл бұрын
coc still gives me an error when I #include "headerfile", but I can make it and the executable works fine. How can I remove the errors from nvim? EDIT: By installing the vim-cmake plugin everything started working.
@sadashivsahoo3 жыл бұрын
Hi How to find atlas(automatically tuned linear algebra software) in cmake v3.19
@moeenkamali12888 ай бұрын
please give me model of keyboard you are using :)
@Master-yn6ie3 жыл бұрын
Nice, can't wait for the next episode in the series.
@noiseflow4306 Жыл бұрын
fucking amazing my guy
@yashmanwani62323 жыл бұрын
I wish you covered how to make separate debug and release executables with cmake.
@kandodev3 жыл бұрын
I’m planning an advanced/modern use video for cmake!
@yashmanwani62323 жыл бұрын
@@kandodev thanks
@maxmccord98838 ай бұрын
@@kandodev are you still planning an advanced video? 😇 your video was extremely helpful to me and I'd love to see more!
3 жыл бұрын
Thank you for sharing.
@edinetgrunhed6000 Жыл бұрын
how to implement in windows?
@kandodev Жыл бұрын
Best way to just use WSL in windows and follow the unix path.
@edwardzdankiewicz906810 ай бұрын
The keyboard is too loud speaker too quiet. Hard to hear speaker when he is typing
@mxolisixulu80352 жыл бұрын
Thst's why he's gettin paid for it
@ManuelGx23 жыл бұрын
Scared me at 9:14
@jackier82663 жыл бұрын
Nice tutorial. But the speed of command typing is too fast for new users.
@antonfernando84092 жыл бұрын
cool
@godDIEmanLIVE2 жыл бұрын
Great work man. Really got me started. One tip: don't use custom vim mappings in tutorials. Took me a while to got my bash-script running, because I was a bit confused on where cmake --build should be run and how etc.
@kandodev3 жыл бұрын
One important thing I missed. Please add a CONFIGURE_DEPENDS flag to the recursive glob so that it looks like: file(GLOB_RECURSE SRC_FILES CONFIGURE_DEPENDS src/*.cpp). This is necessary to make sure CMake regenerates the list of files every time. (Not as efficient but beats listing source files manually!) Note that you should also bump up the min version to 3.12 when this flag was added. Edit: Some dependencies (like the latest SFML version in Ubuntu, Thanks Alex) will use imported targets instead of result variables. In those cases, after find_package, all you have to do is link to the sfml lib: l;ike sfml-graphics
@alexreinking3 жыл бұрын
It doesn't beat listing source files manually because manual source file listing is the *only* correct way to do it. See the docs: cmake.org/cmake/help/latest/command/file.html#glob 1. The developers have explicitly stated that it is wrong to do this. That should give you pause. If you encounter an issue, the developers will likely not be receptive to fixing it for you, but will rather tell you to list your sources. 2. CONFIGURE_DEPENDS is not guaranteed to work. (See point 1) 3. If globbing fails, you will have a difficult time figuring out what extra source file got added or removed. 4. Globbing, especially recursive globbing, is slow and gets worse the more files you have. This is a real issue on Windows. 5. Globbing is particularly likely to fail when doing git bisects, switching branches, or performing other source control operations that move file timestamps backward. Ignore this at your own peril.
@kandodev3 жыл бұрын
@@alexreinking In my experience, I've had a lot more issues when listing files manually (imagine listing 1000 source files and trying to figure out if you missed one) than I've ever had from globbing. Even if configure_depends doesn't work, literally cleaning and rebuilding still works every time. What do you mean by globbing failure in 3? Globbing is such a small factor in terms of build time that the slightly slower builds are worth the hassle free build experience. For 5., I suggest not committing build artifacts since they are ephemeral and should be re-built locally.
@alexreinking3 жыл бұрын
@@kandodev Cleaning and rebuilding every time is absolutely unreasonable _especially_ when you have "1000 source files"! I shouldn't have to explain the utility of incremental builds. I could see using a glob to _migrate_ an existing project to CMake, but editing one line in a file is not fraught with issues relating to "missing one" source file and having the build fail. Once the build is working, you should still replace the glob with its result. Again, globbing is not fast on Windows and isn't insignificant. It can take several seconds. Globbing can fail in several ways, especially during file-system invasive operations like VCS bisects. It can pick up files you didn't intend.
@kandodev3 жыл бұрын
Sorry but expecting people to manually maintain an explicit list of hundreds of source files is absolutely insane. And there’s no point in talking about whether something is minimally or reasonably slow without more quantifiable numbers in specific scenarios.
@alexreinking3 жыл бұрын
@@kandodev Take it up with the CMake devs, then. That is not ergonomic does not change the fact that it is the ONLY way to list source files efficiently and correctly in all scenarios. At least you should not be teaching people to glob without understanding the reasons it is discouraged by the devs. "CMake is not supposed to be your build system" is (a) not true and (b) doesn't communicate the very real things you trade off when you glob.
@markharrington5826 Жыл бұрын
Excellent video thank you Very well presented and by far one of the best Ive seen on cmake That really has been of help to people like myself Would you also credit chatGPT couldn't come up a solution for cmake with GTK3 C which i thought was quite amusing and after some 5 hours trying to find a solution I found the solution myself by A: watching your video and B: viewing other solutions from which I derived a working solution in under half an hour Just shows you and they suggest AI is good I beg to differ thanking you for your time an effort as without people like yourself we wouldn't know the answers
@lifeless97683 жыл бұрын
Thank you so much!
@rishiniranjan17463 ай бұрын
Keyboard sound is very irritating
@CannibalWarthog2 жыл бұрын
2:37
@itayalmoznino51923 жыл бұрын
HI! thanks for the video, and the series as a whole. It helped me setup vim as a nice c++ development platform :) I have ran to a problem with the CMakeGenerate and CmakeBuild. I have this small sfml project that im working on. it has only two files, and currently no header files. in the generation phase it says it found the sfml library files, but in the build phase it does not recognize any of them :'>( I would greatly appreciate if you or anyone watching could take a quick look on the screenshots I added and suggest a solution!! :) not for the faint of heart: imgur.com/a/ILCKumw thanks!!
@kandodev3 жыл бұрын
Hi, yeah sfml was probably a bad example for me to pick here since the modern versions of the library switch from the _INCLUDE_DIRS and _LIBRARIES to imported targets. So you can just do: target_link_libraries( sfml::system sfml::window sfml::graphics) instead of using SFML_LIBRARIES and the _INCLUDE_DIRS. I'm gonna make a video on some of these modern configurations soon.
@itayalmoznino51923 жыл бұрын
@@kandodev Wow thank you very much man! it worked (instead of sfml::system it is sfml-system etc.) thanks :)
@rhts4205 ай бұрын
Who finds the keyboard typing annoying ?
@cedricortencio83622 жыл бұрын
I'm convinced that the big investors and analysts are trying to scare us to keep us poor and ignorant to the market.. because its steady
@Autom_te Жыл бұрын
your keyboard is very loud and annoying
@everett79033 жыл бұрын
I concur with what most people are saying, this is definitely a good introduction and directly applicable to a project I'm working on at work.
@Antagon6662 жыл бұрын
Jesus, your fingers just fly on the keyboard.
@duvvuindirapriya905210 ай бұрын
You are Demi God to me 😭😭😭. Thankyou for this awesome Content. Will you able to do more content like this for helping people around.
@dr_bodling Жыл бұрын
Gosh, your keyboard sounds like a damn typewriter. Very distracting......nice info though.
@nightghost872 жыл бұрын
Good video, only minus your keyboard is louder than your voice..........
@prasobhprakasan59213 жыл бұрын
Thank you very much for the knowledge
@chandusai3120 Жыл бұрын
No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. this error i got how to resolve
@Canoxix7 ай бұрын
'build-essentials' package
@bitterlemonboy2 жыл бұрын
Uses vi. The most unpractical file editor.
@ratgirlflora Жыл бұрын
28 minutes im going to literally turn into a fish
@xarax79503 ай бұрын
every good tutorial !!!!
@KittyGeorgia-m9x7 күн бұрын
Janae Turnpike
@kirkpennock2997 Жыл бұрын
One thing, cmake seems to have alot of variables that are not defined but are availible to use, like your example of the SFML, where do you find those ${SFML_LIBRARIES} name and ${SFML_DEPENDENCIES}?
@gurunadhan26662 жыл бұрын
Amazing
@testforcomment2 жыл бұрын
good CMake tutorial and it looks you are an i3wm user. but have several off-topic questions. Question0. what is the tool you are using to play the slide? during the whole tutorial Question1. how did you configure your shell to add an underscore to the file name like dot(.) and CMakeList.txt kzbin.info/www/bejne/o3y9Xpxjist6nbM Question2. what is the plugin of vim support offset display in the left gutter? kzbin.info/www/bejne/o3y9Xpxjist6nbM Question3. what is the plugin doing the [Indexing 50% 1/2] at the left bottom corner kzbin.info/www/bejne/o3y9Xpxjist6nbM Question4. what is the plugin for marking the error line based on build command output? kzbin.info/www/bejne/o3y9Xpxjist6nbM
@kandodev2 жыл бұрын
Hey, 0: marp (I'll have a small video on it soon) 1: Provided automatically by github.com/sorin-ionescu/prezto (might be my p10k theme? I'm actually not sure on that) 3,4,5: all of these done by CoC. I have a tutorial series on this: kzbin.info/www/bejne/jJqrmKx3papssK8& (although I'm working on an updated one with neovim lsp instead)
@LS-cb7lg3 жыл бұрын
good tutorial but im confused by your fast typing xD
@simonedeangelis2 жыл бұрын
Really amazing video! so clear! thank you so much!
@hts24252 жыл бұрын
very good explanations, thanks so much
@pooriaheidary62042 жыл бұрын
By far, The most fluent cmake tutorial on youtube.
@lucasrodrigues97662 жыл бұрын
The best tutorial, thanks.
@shrikant_paliwal3 жыл бұрын
Best Video Thanks man !
@Ruddens3 жыл бұрын
nice tutorial , i find cmake is not too difficute
@malusmundus-96052 жыл бұрын
I love you. Thank you.
@alexandriati90603 жыл бұрын
Very nice tutorial
@miaomiao14153 жыл бұрын
only thanks can I say
@liminal68232 жыл бұрын
Excellent tutorial. Thanks.
@canerbaba3872 жыл бұрын
thanks for the tutorial. how is it possible to add header files to the project as well as source files?
@kandodev2 жыл бұрын
Just target_include_directories to add further include dirs for your target.
@Jedlmind2 жыл бұрын
Thank you!
@michaelmueller96353 жыл бұрын
thx, this is useful
@dynamicgecko12133 жыл бұрын
Very informative and well-structured video. Your keyboard and breathing sounds are very distracting sometimes though.
@ANOCEANGROUND Жыл бұрын
The flow was spot on. At last I can now feel comfortable with cMake. Sir, you just earned my subscription. I tip my hat to you.