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
    -------------------------
    ---
    *--*
    ---

КОМЕНТАРІ • 22

  • @countbrapcula-espana
    @countbrapcula-espana 3 роки тому +12

    C++ package management still stuck in the 80s as Rust just gets it. I really want C++ ecosystem to be easier here.

  • @meowsqueak
    @meowsqueak Рік тому +3

    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

  •  3 роки тому +14

    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.

    • @alexreinking
      @alexreinking 3 роки тому +1

      Yeah, it's a great backend build model with an awful frontend DSL

  • @AlexanderRibchansky
    @AlexanderRibchansky 2 роки тому +2

    Thank you a lot, Mateusz, for great and useful tech talk! So many useful information said in short form! :)

    • @BoostCon
      @BoostCon  2 роки тому

      Glad to hear that!

  • @richardvonlehe4581
    @richardvonlehe4581 Рік тому +2

    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.

    • @MateuszPusz
      @MateuszPusz Рік тому +1

      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.

  • @sergeyvelykokhatko5687
    @sergeyvelykokhatko5687 Рік тому

    Great presentation and experience exchange. I like the slide Nr.24 because yours "the less cmake the better" is exactly what I had )))

  • @michaelchadwick1820
    @michaelchadwick1820 3 роки тому +1

    Great talk--can't wait to try Conan now!

  • @alexreinking
    @alexreinking 3 роки тому +1

    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.

  • @xfreeman86
    @xfreeman86 2 роки тому +1

    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.

    • @MateuszPusz
      @MateuszPusz 2 роки тому

      This is correct, thanks for fixing me ;-)

  • @alexreinking
    @alexreinking 3 роки тому +3

    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.

    • @mapron1
      @mapron1 3 роки тому

      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

    • @alexreinking
      @alexreinking 3 роки тому

      @@mapron1 sharing the outputs of custom commands between the configs, for one.

  • @simonfarre4907
    @simonfarre4907 3 роки тому +2

    Thank god for cargo is all i can say.

  • @Voy2378
    @Voy2378 2 роки тому +1

    I would like to report a bug in slides:
    no CMake example can be motivational

  • @LegalizeAdulthood
    @LegalizeAdulthood 3 роки тому +3

    Sorry, but IMO using Python as the basis for a C++ package system is a fail.

    • @UrSoMeanBoss
      @UrSoMeanBoss 2 роки тому +19

      Languages are tools not religions. This usecase is a perfect fit for an interpreted scripting language.

    • @martinbisson
      @martinbisson 2 роки тому +5

      IMHO towing a Ferrari with something other than a Ferrari is not a fail. Different languages, different strengths, different uses.