C++ Weekly - Ep 208 - The Ultimate CMake / C++ Quick Start

preview_player
Показать описание
Biggest episode ever! CMake, sanitizers, clang-tidy, conan, cmake-format, clang-format, cppcheck, doxygen, ctest, catch, {fmt}, and more!

☟☟ Awesome T-Shirts! Sponsors! Books! ☟☟

Upcoming Workshop: Applied constexpr: The Power of Compile-Time Resources, C++ Under The Sea, October 10, 2024

T-SHIRTS AVAILABLE!

WANT MORE JASON?

SUPPORT THE CHANNEL

GET INVOLVED

JASON'S BOOKS

► C++23 Best Practices

► C++ Best Practices

JASON'S PUZZLE BOOKS

► Object Lifetime Puzzlers Book 1

► Object Lifetime Puzzlers Book 2

► Object Lifetime Puzzlers Book 3

► Copy and Reference Puzzlers Book 1

► Copy and Reference Puzzlers Book 2

► Copy and Reference Puzzlers Book 3

► OpCode Puzzlers Book 1


RECOMMENDED BOOKS

AWESOME PROJECTS

O'Reilly VIDEOS

Рекомендации по теме
Комментарии
Автор

And this is why so many people dump on C++. A language where simply setting up a project could take a few days.

novarem
Автор

Thanks Turner, I was on the edge of giving up on C++ & CMake and you pushed me right over the edge...smooth. I'm sorry if there're any typos in my comment, there is blood coming out my eyes and my vision is compromised. As I fall into depression and as a final act of sodomy I tried to give you a thumbs down and report your video. But due to impaired vision I ended up hitting 'Subscribe' and the 'Bell' icon. Nothing is going my way...

johnconstantine
Автор

I can't wait to see Jason's game dev project with all his c++ best practices!

rinkaenbyou
Автор

What most devs do not understand is that CMake is not a build system. It is a tool that allows to create a build system and imo the C++ ecosystem needs a defacto convention-over-configuration build system created with CMake. Too many dev hours have been wasted already writing crappy CMake code and reinventing the (build) wheel.

FlorianWolters
Автор

the week I found your Channel was the week you released this video, at that time I didn't understand a single thing about this video.
it is very happy for me to say I finally made it to the point that I understand (almost everything) that was said in this video.

ali
Автор

It would be interesting to make this all work with a custom tool-chain. I suppose it works OK using a CMake tool-chain file targeting the build platform/arch however when cross compiling I expect some qemu and test framework trickery to be required.

xavierthomas
Автор

I wish there will be a debugger setup video that is as concise and thorough. Thank you for this, it is massively helpful.

sndrb
Автор

So much complicated boilerplate, this is definitely the part of C++ that sucks most. Having a template/skeleton helps a lot, thanks. I would love to see a equivalent for build2. I know it is not seeing much adoption but it looks like a more decent and future proof solution and having more documentation to help novices get started can only help.

xavierthomas
Автор

Appreciate the video Jason. I dabbled a little with CMakelist files in the past but I find them just like C++ - a verbose mess (and I really like programming in C++). Life does not need to be this difficult, there is no excuse in this day and age. I have since moved to Rust and cargo and have zero intention of using C++ for future projects. More time developing and less time hacking away at cmake files!

diarmaidmac
Автор

I dream of a day when all this work somehow gets magically bundled together into a single tool with sane defaults that works in 99% of cases out of the box with a simple command and little to no configuration.

In the mean time, this is excellent, thank you.

superscatboy
Автор

This was very useful, thank you! One suggestion would be to walk through the steps you went through when adding one of these features to a Make system, because in my (limited) experience that starts to feel like playing whack-a-mole with the errors.

fgiraffe
Автор

Hello Jason, Could you point me configuration for your nvim and console setup to have this colourfull view ?

rafalmichalski
Автор

Cannot wait for the Game-development one, I was in the Bucharest EA audience.

Razyelgore
Автор

This is something I just can't understand at the moment: why does it take 400+ lines of cmake code, plus I-don't-know how much more from other configuration files, just for an empty c++ project? why does it have to be complex? why isn't all of this configuration (or some variation of it) and the tools used here (or any alternative thereof) the default value? why isn't setting up these tools easier? I would neeeever eeeever have been able to get all of this to work in my bedroom alone from scratch. It doesn't make sense at all for me.

louislebel
Автор

Nice! You are in right direction! Show peaple as mush as you can, let more C++ culture studying for all!

leanidchaika
Автор

So much best practice that the project never starts. But I know it’s important it’s just sad imo

meharjeetsingh
Автор

Project specific CMake options should use a common prefix, e.g. MYPROJECT_ for this example. Otherwise problems will occur sooner or later if using other CMake projects with the add_subdirectory command.

FlorianWolters
Автор

feels like total over-kill to me, but idk probably I am just 1000 lvls below turner-land

marcomarmelade
Автор

Great video! Its like a Effective CMake, thanks!

bobbymah
Автор

Instead of using INTERFACE targets for compile definitions and compile options one should use a CMake toolchain file. This allows separation of concerns, e.g. adding support for a new compiler with a specific version is done by adding a new toolchain file to the build system.

FlorianWolters