import CMake, CMake and C++20 Modules - Bill Hoffman - CppCon 2022

  Рет қаралды 25,716

CppCon

CppCon

Күн бұрын

Пікірлер: 45
@djordjepepic1656
@djordjepepic1656 Жыл бұрын
Was shocked and impressed to discover the presenter is actually the original author of CMake! Also once I realized this, I also realized that this guy is exactly how I would have imagined the author of CMake to be; smart, easygoing, friendly and here to build some C++! Anyways great talk, definitely very helpful to me in my endeavor of writing a new package manager for C++.
@JaskMar
@JaskMar 2 жыл бұрын
17:00 to skip things we already know about CMake (non-modules-related information)
@TheMR-777
@TheMR-777 2 жыл бұрын
I thought it's just a usual Cpp talk, opened it, and when got to know he's the creator of CMake, I was mind-blown! It's an honor to have a session with Mr. Hoffman. Moreover, a Great thanks to CppCon as always, for being a source of such valuable knowledge :)
@ianliu88
@ianliu88 2 жыл бұрын
C++ is now on par with fortran, congrats!
@moamenkhet
@moamenkhet 2 жыл бұрын
Amazing talk, thank you very much!
@Omnifarious0
@Omnifarious0 2 жыл бұрын
I'm really looking forward to when I can use this without compiling custom versions of system packages.
@brynyard
@brynyard Жыл бұрын
It's nice to have a configure/build tool that finally has sorted out (most) of various IDE&OS build quirks, but I think it's high time that the syntax get revised into anything that follows even just the most basic good practices of a programming language (or like someone mention - can be used like a lib and the config done in python). There's tons of severe issues with things like proper expressions, scoping, variable scoping, argument parsing, return values, debugging tools, quoting, inconsistent naming scheme, etc, and somehow I (and many more!) are really put off using CMake by these deficiencies. While continuing ironing out platform quirks and tool compatibilities are important, it's a bit disconcerting that these things doesn't even seem to even be considered for fixing.
@llothar68
@llothar68 Жыл бұрын
You just need to read a good language description. The only one i have seen is not in the online docs but you have to buy this CMake for Professionals book. The online documentation really needs thousands of examples. Look at the PHP documentation which is still the gold standard. And finally we need to add deprecation warnings to all options.
@brynyard
@brynyard Жыл бұрын
@@llothar68 sorry, but a better description of CMakes terrible language syntax doesn’t improve it (which incidentally also applies to PHO’s infamously inconcistent standard library). There are no good sources for how to write «good» CMake scripts, quite simply because it’s nigh impossuble given all the quirks one have to incorporate.
@angelmarauder5647
@angelmarauder5647 Жыл бұрын
@@brynyard what do you use instead?
@dexterman6361
@dexterman6361 2 жыл бұрын
Can't wait to test this out! Shame cuda isn't catching up! Thank you for the video!
@PaulHindt
@PaulHindt 2 жыл бұрын
I would love to see a Python version of CMake, where CMake is simply imported as a module into Python script. Given the steady rise in popularity of the Meson build system, I suspect that there are many other C/C++ developers that share this opinion. I've written both small and largeish build scripts in CMake and, while generally a joy to use, my biggest gripe with CMake is having to learn its dedicated language syntax. To my mind the biggest strength of CMake is not its custom language, but the years of hard-won build system knowledge that KitWare has amassed. Mr. Hoffman sort of touches on this in the video, when he discusses reverse-engineering Visual Studio solutions to create CMake generators. The second biggest strength of CMake is its toolchain and IDE integration.
@petermuller608
@petermuller608 5 ай бұрын
Isn't syntax completely arbitrary? It would be trivial to transpile from python to CMake if you restrict your python to the functions available in CMake
@egorsozonov7425
@egorsozonov7425 2 жыл бұрын
It's 2022, C++ is 40 years old, and yet C++ head honchos are still figuring out how to compile a C++ program...
@IllumTheMessage
@IllumTheMessage Жыл бұрын
We have to get it juuuuuuust right.
@crea7or
@crea7or Жыл бұрын
This is why Rust and other languages getting more attention than C++. Building apps shouldn't be that hard.
@StefaNoneD
@StefaNoneD Жыл бұрын
Exactly what I was thinking!
@nandhan6637
@nandhan6637 Жыл бұрын
ya lacking simplicity and wastes more time which is precious
@cgazzz
@cgazzz Жыл бұрын
This is however an experimental feature to support a huge new experimental feature on 3 different compiler families. Once a CMake pattern is started it's fairly simple to repeat
@TheMaidenOnes
@TheMaidenOnes 2 жыл бұрын
No clang support for modules yet..
@StefaNoneD
@StefaNoneD Жыл бұрын
Still way too complicated compared to modern language toolkits for C#, Java, Rust, Go etc. You really have to study (!) CMake in order to use it professionally. In contrast, the above mentioned languages offer more easy way to use their build systems. Especially Rust with Cargo is very, very easy to use.
@JeremyCoppin
@JeremyCoppin Жыл бұрын
Exactly !! Compiling/Linking C++ is the biggest hurdle you will have in any C++ project, not the problem you're trying to solve, no matter how complex that problem is. The second problem is that there are very few 'modules to do common tasks' and if you do find one, see above. I have 10's of abandoned projects because of this, the latest being trying to link paho mqtt which I have working in Java and Python, neither of which gave me any issues.
@llothar68
@llothar68 Жыл бұрын
@@JeremyCoppin Ha, if you think compiling and linking is hardest, try deploying. But thats a language independent problem these days.
@YourCRTube
@YourCRTube Жыл бұрын
55:08 A bit confusing mymodule_part_internal.cpp needs to be part of the set, though it does not export. I guess that's because it declares new partition?
@Key_Capz_
@Key_Capz_ 2 жыл бұрын
For some reason sstream module in vs 2022 isn't fully working unless you #include it.
@oraz.
@oraz. Жыл бұрын
Hold up, you need to build a patched gcc to do this?
@Dazza_Doo
@Dazza_Doo 3 ай бұрын
If you're trying to claim that you're the official build of C++, Why haven't you built tools, Where is the integration? Where is the place that I go to download your application that then downloads the appropriate complier that I can then link all my projects to
@王靖凯-w7k
@王靖凯-w7k Жыл бұрын
牛哇,小三年了,总算要来了!
@junaid1464
@junaid1464 2 жыл бұрын
Honestly not happy with what we have for c++, been thinking around rethinking build system for c++, actually this should be 1st priority of standards community
@petermuller608
@petermuller608 5 ай бұрын
The C++ Standard does not know build systems. It barely acknowledges source code is living in "files" Not saying you are wrong, but the standard is the wrong place
@origamibulldoser1618
@origamibulldoser1618 2 жыл бұрын
Cmake is nice, but it's also hard to ignore that cmake is a build system system.
@origamibulldoser1618
@origamibulldoser1618 2 жыл бұрын
13 minutes in and cpp20 and modules are not yet mentioned.
@discreet_boson
@discreet_boson Жыл бұрын
What about support for import std; ?
@pengxie3087
@pengxie3087 Жыл бұрын
it seems to be a C++23 standard feature
@DimiterStanev
@DimiterStanev Жыл бұрын
If only CMake supported generated .vcxproj with relative paths... When you have thousands of .vcxprojs it's hard to migrate over time.
@petermuller608
@petermuller608 5 ай бұрын
While I love CMake, I really dislike how hard it is to learn the modern style. Even the author of CMake uses legacy style set(CMAKE_CXX_STANDARD...) instead of target_compile_features(...) And it's not because it's slide code, both take up a line. Also complexity cannot be the reason, since he used much more complex generator expressions before. How should a novice learn? Is there something like shellcheck for cmake, warning about the usage of old features?
@rabutuomr3382
@rabutuomr3382 2 жыл бұрын
Module!
@ko_fes
@ko_fes 2 жыл бұрын
CMake under windows is a nightmare. 'Couse you can't change compilers/debugger/linker by changing cmake file only (if you want to use utilities that are not packaged by vs installer), - you also must some how setup dev environment and that is not trivial if you don't want to use IDEs and just want to build & run a project by a few commands. And also - why for building cmake project under windows it's necessary to generate a whole bunch of sln-related files, even if you use clang-cl? When Windows developers resolve this problem?
@lmi9f9
@lmi9f9 Жыл бұрын
Start over, you're doing it wrong. I don't know Such issuea.
@DFPercush
@DFPercush Жыл бұрын
You choose a generator (visual studio project, ninja, make) and a compiler ("specify native compiler" in cmake-gui) during the configure step. That information is in the cache. You might want to just start over with a new build directory if you don't see those options. If you want to use a utility that is not part of the standard compiler toolchain, you probably want to use add_custom_command and add_custom_target. If you need to build a visual studio project without opening the IDE, use msbuild. or cmake --build . But if you don't want any visual studio files, then you probably picked the wrong generator.
@junaid1464
@junaid1464 2 жыл бұрын
Build system becoming job requirement. :(
@JeremyCoppin
@JeremyCoppin Жыл бұрын
It is a job in and of itself.
@kspangsege
@kspangsege 2 жыл бұрын
Emacs 👍 🙂
@konstantinlimarev2639
@konstantinlimarev2639 2 жыл бұрын
Cpp modules kzbin.info/www/bejne/a4mbYWaZjcpjaLsm50s
CMake 2022 C++ Modules and More - Bill Hoffman - CppNow 2022
1:15:57
Branchless Programming in C++ - Fedor Pikus - CppCon 2021
1:03:57
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 155 МЛН
兔子姐姐最终逃走了吗?#小丑#兔子警官#家庭
00:58
小蚂蚁和小宇宙
Рет қаралды 13 МЛН
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 2,1 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 35 МЛН
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
A Practical Introduction to C++20's Modules - Hendrik Niemeyer [ ACCU 2021 ]
1:10:41
Back to Basics: Debugging in C++ - Mike Shah - CppCon 2022
1:01:19
Human vs Jet Engine
00:19
MrBeast
Рет қаралды 155 МЛН