CMake + Conan: 3 Years Later - Mateusz Pusz - [CppNow 2021]
Вставка
- Опубліковано 12 вер 2024
- #Boost #Cpp #CppNow
Slides: cppnow.org/his...
CppNow Website: cppnow.org
CppNow Twitter: @CppNow
Streamed & Edited By Digital Medium Ltd: events.digital...
------
This lecture is a continuation of my C++Now 2018 "Git, CMake, Conan: How to Ship and Reuse our C++ Projects" talk. This time I will share what I've learned and what has changed through the last three years in sharing and reusing C++ projects via CMake and Conan. I will share the updated best practices of packaging C++ projects and the most important highlights of the upcoming Conan 2.0.
If you are interested in package management in large enterprise projects, you probably do not want to miss this talk.
------
------
May 1, 2022 - May 6, 2022 - Aspen, Colorado
-------------------------
---
*--*
---
C++ package management still stuck in the 80s as Rust just gets it. I really want C++ ecosystem to be easier here.
Slides are actually here: github.com/train-it-eu/conf-slides/blob/02f6712db703581079b75b8055db2ea4d4685f61/2021.05%20-%20C++Now/CMake%20+%20Conan%20-%203%20years%20later.pdf
Great talk. Sadly, it really reaffirms my belief that CMake's language is weird, and that is really a shame, since the functionality it provides really is state of the art.
Yeah, it's a great backend build model with an awful frontend DSL
Thank you a lot, Mateusz, for great and useful tech talk! So many useful information said in short form! :)
Glad to hear that!
Very very good talk. I wish there were more like this. One thing I keep wondering is why it's not easier to build outside of the source tree with Conan. Conan really seems to want you to build within the source tree.
Thanks! I am happy that you liked it 🙂
Regarding Conan, I do not think it is true it "want you to build within the source tree". It always builds dependencies in its local cache directory located typically in ~/.conan/p. The generated files for the current project typically land in the ./build subdirectory indeed, but this is common practice for most of the tools, and I do not think it is the same as in-source builds that put object files next to your sources in the same directories. Also, in case you do not like the default path to the generated files for CMake, you can always change it with `conan install --output-folder ...` option.
Great presentation and experience exchange. I like the slide Nr.24 because yours "the less cmake the better" is exactly what I had )))
Thanks for watching!
Great talk--can't wait to try Conan now!
At 6:18, the actual answer is "it depends". If CMP0012 and CMP0054 are set, then the answer on the slide is correct, but if they aren't (as shown on the slide, actually), then it will print #1 and #2, but not #3. If only CMP0012 is set, then #1 #2 and #3 are printed. If only CMP0054 is set, then only #1 is printed. This is why you must *_*always*_* set a cmake_minimum_required version to get predictable behaviors.
38:20 Slide is correct that EXPORT_NAME property sets name of the exported target that will be imported by dependent projects. Speaker misspoke that it sets the file name. Instead, that is controlled by the OUTPUT_NAME property.
This is correct, thanks for fixing me ;-)
At 18:40, be warned that there are many bugs with Ninja Multi-Config up through 3.19, at least. If you want to use that generator, you should be using the absolute newest version of CMake. I have no doubt it will become my go-to generator in time since Ninja is so great.
What is the use for multiconfig ninja? Only thing came to my mind - build release and debug on CI at one go, but that's a rare case
@@mapron1 sharing the outputs of custom commands between the configs, for one.
Thank god for cargo is all i can say.
I would like to report a bug in slides:
no CMake example can be motivational
Sorry, but IMO using Python as the basis for a C++ package system is a fail.
Languages are tools not religions. This usecase is a perfect fit for an interpreted scripting language.
IMHO towing a Ferrari with something other than a Ferrari is not a fail. Different languages, different strengths, different uses.