Build and Configure CMake Projects With CMakePresets

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

Комментарии • 16

  • @codingwithmat
    @codingwithmat  Год назад +2

    Are you guys going to use presets in your work flow? Let me know!

    • @dastox777
      @dastox777 Год назад

      there is any way to run config-preset as part of build-preset ? and no in 2 different preset calls ?

  • @BredeJohansen
    @BredeJohansen Год назад +2

    A nice introduction to CMake presets 👍

    • @codingwithmat
      @codingwithmat  Год назад

      Thank you for watching! CMakePresets are game-changing when it comes to sharing build configs :)

  • @infirms1337
    @infirms1337 Год назад +2

    Thank you, I didn't expect such a good explanation of a topic that was new to me. I hate watching tutorials and prefer to update my knowledge through the documentation, but this was really clean, man, especially part with your custom toolchains, this helped me a lot, thank you! Sometimes laziness pays off 😉.

    • @codingwithmat
      @codingwithmat  Год назад

      Just saw this comment. It makes me very happy to know that people actually enjoy watching my videos! And of course, that they learn something new. Thank you!

  • @michhedeberg
    @michhedeberg 11 месяцев назад +1

    Great video. Well explained.

    • @codingwithmat
      @codingwithmat  11 месяцев назад

      Thanks for watching, glad it helped you out :)

  • @pablorc8091
    @pablorc8091 19 дней назад

    What is the advantage of this over using a makefile with targets like build_debug, build_release, test etc? That's what I usually do. Just "saving" my commands in a makefile

    • @codingwithmat
      @codingwithmat  17 дней назад

      Portability: Makefiles won't work in all platforms (Linux mainly and maybe Windows if you have mingw or something). CMake integrates well into every serious C++ IDE out there, Vim setups etc.
      Declarability: If you know CMake, it's much easier to reason about what the project structure is.

  • @fredeisele1895
    @fredeisele1895 Год назад

    Do you have any examples which use the presets `include` directive?

  • @JTordur
    @JTordur Год назад +1

    I noticed you used conan, is there any way to make the preset run the conan install before the configuration step?

    • @codingwithmat
      @codingwithmat  Год назад

      Sorry I missed this comment. And absolutely, it's quite easy to create a Conan preset. Take a look at my github, under the "base64pp" project, I have a CMakePresets.json you can copy there.
      I'm actually planning to record a Conan video this week, as Conan 2.0 is out and a little bit more stable with the recipes situation.

    • @codingwithmat
      @codingwithmat  Год назад

      AFAIK, there's no way to make CMake run the `conan install ...` command without actually putting exec calls inside your cmake, but that would happen after the conan toolchain. Maybe there is a way now, but I'd recommend looking at conan's docs.

  • @theREALhillshum
    @theREALhillshum Месяц назад +2

    That music is ATROCIOUS! Seriously. It's way interrupting and obnoxiously loud. Do better