C++ Weekly - Ep 376 - Ultimate CMake C++ Starter Template (2023 Updates)

  Рет қаралды 16,035

C++ Weekly With Jason Turner

C++ Weekly With Jason Turner

Күн бұрын

☟☟ Awesome T-Shirts! Sponsors! Books! ☟☟
Upcoming Workshop: Understanding Object Lifetime, C++ On Sea, July 2, 2024
► cpponsea.uk/2024/sessions/und...
Upcoming Workshop: C++ Best Practices, NDC TechTown, Sept 9-10, 2024
► ndctechtown.com/workshops/c-b...
Upcoming Workshop: Applied constexpr: The Power of Compile-Time Resources, C++ Under The Sea, October 10, 2024
► cppunderthesea.nl/workshops/
Project Link: github.com/cpp-best-practices...
T-SHIRTS AVAILABLE!
► The best C++ T-Shirts anywhere! my-store-d16a2f.creator-sprin...
WANT MORE JASON?
► My Training Classes: emptycrate.com/training.html
► Follow me on twitter: / lefticus
SUPPORT THE CHANNEL
► Patreon: / lefticus
► Github Sponsors: github.com/sponsors/lefticus
► Paypal Donation: www.paypal.com/donate/?hosted...
GET INVOLVED
► Video Idea List: github.com/lefticus/cpp_weekl...
JASON'S BOOKS
► C++23 Best Practices
Leanpub Ebook: leanpub.com/cpp23_best_practi...
► C++ Best Practices
Amazon Paperback: amzn.to/3wpAU3Z
Leanpub Ebook: leanpub.com/cppbestpractices
JASON'S PUZZLE BOOKS
► Object Lifetime Puzzlers Book 1
Amazon Paperback: amzn.to/3g6Ervj
Leanpub Ebook: leanpub.com/objectlifetimepuz...
► Object Lifetime Puzzlers Book 2
Amazon Paperback: amzn.to/3whdUDU
Leanpub Ebook: leanpub.com/objectlifetimepuz...
► Object Lifetime Puzzlers Book 3
Leanpub Ebook: leanpub.com/objectlifetimepuz...
► Copy and Reference Puzzlers Book 1
Amazon Paperback: amzn.to/3g7ZVb9
Leanpub Ebook: leanpub.com/copyandreferencep...
► Copy and Reference Puzzlers Book 2
Amazon Paperback: amzn.to/3X1LOIx
Leanpub Ebook: leanpub.com/copyandreferencep...
► Copy and Reference Puzzlers Book 3
Leanpub Ebook: leanpub.com/copyandreferencep...
► OpCode Puzzlers Book 1
Amazon Paperback: amzn.to/3KCNJg6
Leanpub Ebook: leanpub.com/opcodepuzzlers_book1
RECOMMENDED BOOKS
► Bjarne Stroustrup's A Tour of C++ (now with C++20/23!): amzn.to/3X4Wypr
AWESOME PROJECTS
► The C++ Starter Project - Gets you started with Best Practices Quickly - github.com/cpp-best-practices...
► C++ Best Practices Forkable Coding Standards - github.com/cpp-best-practices...
O'Reilly VIDEOS
► Inheritance and Polymorphism in C++ - www.oreilly.com/library/view/...
► Learning C++ Best Practices - www.oreilly.com/library/view/...

Пікірлер: 39
@PedroOliveira-sl6nw
@PedroOliveira-sl6nw Жыл бұрын
The hero we needed!
@oracleoftroy
@oracleoftroy Жыл бұрын
I'm really glad for the move back to one repo. I based a few projects after the original version and every once in a while I check back to see if there are any new warnings or features, etc, I want to pull into my code, and was really confused when I tried to figure out where everything when to. I'll definitely have to pour over the new version and see what I want to incorporate, there were a few features in the old version that I didn't need or wasn't sure how to make use of at the time that would be useful now.
Жыл бұрын
I've tracked the development of this template for some time now. Great work
@Luca-yy4zh
@Luca-yy4zh 10 ай бұрын
Great work. Very useful. Thanks.
@ranseus
@ranseus Жыл бұрын
This is tens of thousands of dollars worth of work. Jason's just earned the "Legend" accomplishment in my mind.
@maciejhaj5789
@maciejhaj5789 Жыл бұрын
Love your work, thanks!
@cppweekly
@cppweekly Жыл бұрын
That's a complicated question that depends a lot on the specific size of the array you are accepting.
@josueherrera3455
@josueherrera3455 Жыл бұрын
This is incredible
@MichaelCaisse_ciere
@MichaelCaisse_ciere Жыл бұрын
Love the change to CPM!
@oschonrock
@oschonrock Жыл бұрын
Now all we need is a proposal paper to the appropriate ISO Committee for std::cmake_template ;-)
@embeddor3023
@embeddor3023 Жыл бұрын
I am ready to sell one kidney if this will make them standardize any build system really.
@oschonrock
@oschonrock Жыл бұрын
@@embeddor3023 Yes of course you are right... But don't you mean: "I would be prepared to DONATE one kidney if that made them standardize an easy to use build system"? ;-)
@eggmeister6641
@eggmeister6641 Жыл бұрын
@@oschonrock No, if I'm going to be pissing at half capacity, I'm getting paid for it.
@anon_y_mousse
@anon_y_mousse Жыл бұрын
@@eggmeister6641 Sounds fair, but unfortunately you can't sell kidneys, legally.
@eggmeister6641
@eggmeister6641 Жыл бұрын
@@anon_y_mousse In the US*
@allNicksAlreadyTaken
@allNicksAlreadyTaken Жыл бұрын
Why is there no link to this repo in the video description?
@not_ever
@not_ever Жыл бұрын
I appreciate the simplification compared to the old project. Thanks for making this.
@cppweekly
@cppweekly Жыл бұрын
Thanks, it's one of those things that took a couple of years to really understand what was needed.
@ibrahimkhattab6439
@ibrahimkhattab6439 Жыл бұрын
I didn’t understand what the purpose of the packaging maintainer mode, because I didn’t find it any where else in the project or on internet. Can you explain it please? It would very helpful, if you make a video going through the cmake template explaining it more in detail. Thank you very much.
@cppweekly
@cppweekly 11 ай бұрын
It disables most static analysis and turns off "warnings as errors" so that the tooling gets out of your way if you simply want to build/use/package the project. Most people say you should opt into those things. But in my experience, if you have to opt in, most people will not. So I made the tools the default, and make you opt out of them by enabling packaging maintainer mode.
@Key_Capz_
@Key_Capz_ Жыл бұрын
No vcpkg?
@cppweekly
@cppweekly Жыл бұрын
Nope, I was going for minimal startup effort
@anon_y_mousse
@anon_y_mousse Жыл бұрын
I don't hate cmake, but I would prefer just about anything over it. I kind of like the idea behind nobuild and would like to extend some of the ideas from it. Granted, it couldn't be used for languages other than C or C++, but I suppose someone could translate it if they wanted to. The biggest advantage would be that it would be its own dependency. As long as you have a compiler it would be usable on your system.
@vorrnth8734
@vorrnth8734 Жыл бұрын
Really? When it came out it was such an improvement over autothell. It has its flaws but at least one system is drastically inferior.
@allNicksAlreadyTaken
@allNicksAlreadyTaken Жыл бұрын
Why did you remove conan?
@not_ever
@not_ever Жыл бұрын
"move from Conan to CPM (better control over build flags, less likely to accidentally have ABI/ODR issues)" This is from the git commit that removed Conan.
@vorrnth8734
@vorrnth8734 Жыл бұрын
@@not_ever Hm, but cpm is no full replacement for conan, at least right now.
@not_ever
@not_ever Жыл бұрын
@@vorrnth8734 I didn't say it was. I just copied a commit message.
@vorrnth8734
@vorrnth8734 Жыл бұрын
@@not_ever Yeah right. I just still wonder he replaced it with a non replacement.
@cppweekly
@cppweekly Жыл бұрын
Because conan was too fragile in this environment. The build system was breaking every few months without my touching anything. Either conan would change, or a recipe would change, or a dependency would change...
@AusSkiller
@AusSkiller Жыл бұрын
I've never had a good experience with CMake, half the time I end up needing to just make the projects from scratch instead because CMake doesn't work or doesn't configure things properly and needs hours/days to manually hand edit files to get it to do what it was supposed to.
@LargeDivisor
@LargeDivisor Жыл бұрын
There are lots of things about this project template that I like, but at 4:40, I really need you to tone down the sarcasm. It’s been 10 years and 4 standard updates since C++ Seasoning, and although the algorithms library is still underutilized, it is still not a silver bullet, nor does it cover everyone’s use case perfectly all of the time. Honestly, I don’t have any problem with _GLIBCXX_ASSERTIONS in principle, as long as the compiler can optimize the runtime checks appropriately, but please stop acting like we deserve to have our code pessimized for having the nerve to use indexed access on a vector or calling get() on a smart pointer.
@oracleoftroy
@oracleoftroy Жыл бұрын
You aren't wrong, but I don't think Jason is wrong either. If you are doing an operation over the whole container, you really should use ranged for loops or an algorithm. That doesn't mean you are forced to only used the standard blessed algorithms, that's obviously unworkable, but you should consider writing your own where the standard lacks something you need. The idea is to think in terms of ranges/iterators, not indexes, because iterators can't be out of range (well, unless you forget to check for end() or do something really silly with them). When you do have a one off access for a single value, sure that will be slower in theory, but you ought to be doing a range check anyway, and a lot of the time the compiler should see that redundant range check and eliminate them. That said, in practice it is definitively a feature I'd like for debugging and optimized builds with debug checks enabled, but I'd want the option to turn it off.
@marcbotnope1728
@marcbotnope1728 Жыл бұрын
-1 For no conan
@patho97
@patho97 10 ай бұрын
thanks! feeling somewhat supid now, i added sdl3 to cpm and it added it fine, but when i try to build my project it looks like static analysis runs also on third party stuff.. /cmake-build-debug-visual-studio/_deps/sdl3-src/include\SDL3/SDL_bits.h:78:16: error: implicit conversion changes signedness: 'unsigned long' to 'int' [-Werror,-Wsign-conversion] is this intended? or did i do something wrong?
@cppweekly
@cppweekly 9 ай бұрын
Yes, I'm working on fixes to some of those things on my personal projects. We do need to set up CPM *before* we set up our own warnings and analysis to avoid that kind of problem.
C++ Weekly - Ep 377 - Looking Forward to C++26: What C++ Needs Next
6:54
C++ Weekly With Jason Turner
Рет қаралды 12 М.
C++ Weekly - Ep 400 - C++ is 40... Is C++ DYING?
20:51
C++ Weekly With Jason Turner
Рет қаралды 29 М.
Khóa ly biệt
01:00
Đào Nguyễn Ánh - Hữu Hưng
Рет қаралды 20 МЛН
СНЕЖКИ ЛЕТОМ?? #shorts
00:30
Паша Осадчий
Рет қаралды 8 МЛН
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 23 МЛН
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 37 МЛН
C++ Weekly - Ep 421 - You're Using optional, variant, pair, tuple, any, and expected Wrong!
10:34
The Pointer to Implementation (pImpl) idiom in C++
6:54
platis.solutions
Рет қаралды 12 М.
Do you even test? (your code with CMake)
12:38
Code for yourself
Рет қаралды 18 М.
C++ Weekly - Ep 322 - Top 4 Places To Never Use `const`
18:53
C++ Weekly With Jason Turner
Рет қаралды 34 М.
C++ Weekly - Ep 359 - std::array's Implementation Secret (That You Can't Use!)
11:21
C++ Weekly With Jason Turner
Рет қаралды 27 М.
How To Use VS CODE for C++ | With CMake & Any Compiler
9:14
Code, Tech, and Tutorials
Рет қаралды 71 М.
C++ Weekly - Ep 403 - Easier Coroutines with CppCoro
13:09
C++ Weekly With Jason Turner
Рет қаралды 10 М.
Modern CMake for C++
11:38
Smok Code
Рет қаралды 39 М.
C++ Weekly - Ep 312 - Stop Using `constexpr` (And Use This Instead!)
18:24
C++ Weekly With Jason Turner
Рет қаралды 49 М.
Lid hologram 3d
0:32
LEDG
Рет қаралды 9 МЛН
Asus  VivoBook Винда за 8 часов!
1:00
Sergey Delaisy
Рет қаралды 1,1 МЛН
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 3,3 МЛН