CMake vs Meson - a real life comparison with actual code

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

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

  • @tbttfox
    @tbttfox 3 месяца назад +5

    Just add the --vsenv flag in both your setup and build commands to automatically find and use the visual studio developer prompt.

    • @KeaSigmaDelta
      @KeaSigmaDelta  3 месяца назад +1

      Thanks. I didn't know about that flag. I've pinned this comment to the top...

  • @vaulttectradingco8438
    @vaulttectradingco8438 6 месяцев назад +17

    Can you review zig build system. It is pretty promising and uber uses it afaik to make cross compilation easier.

    • @KeaSigmaDelta
      @KeaSigmaDelta  6 месяцев назад +14

      Interesting idea. Zig is a different programming language, but I see that its build system can be used to compile C/C++ code.
      If there's sufficient interest, then sure.

    • @sona943
      @sona943 4 месяца назад +6

      @@KeaSigmaDelta There is interest

  • @brandonwlee2013
    @brandonwlee2013 15 дней назад

    Did you try the Meson extension on VS Code? Also, do you have a green screen to remove your background?

    • @KeaSigmaDelta
      @KeaSigmaDelta  14 дней назад

      Yes, I tried the Meson VS Code extension, but didn't really use it beyond the syntax highlighting.
      And yes, I use a green screen. That's partially because Camtasia doesn't have any fancy background removal module. But also, chromakeying is more reliable than any background removal software that I've tried. They always get confused between foreground and background.

  • @JohnnyRicha
    @JohnnyRicha 2 месяца назад

    I used to craft Makefiles manually and I was pretty happy until find portability issues. I switched to autotools (which I had most experience as user) and managed to have my full setup with deps and multi module project within half day, I thought it would be too convoluted but the process was quite smooth. Documentation played a big role here. I don’t know if you already made a video about autotools, but if not, I would love to watch.

    • @KeaSigmaDelta
      @KeaSigmaDelta  2 месяца назад +1

      My experience with autotools has been so horrible that I don't want to touch it. That's why I use CMake instead.

    • @JohnnyRicha
      @JohnnyRicha 2 месяца назад

      @ that is an unfortunate, we also would benefit from knowing the pain points. But anyway, good job with the videos. Keep with the good work

    • @KeaSigmaDelta
      @KeaSigmaDelta  2 месяца назад

      @@JohnnyRicha Thanks.

  • @ericr.5477
    @ericr.5477 3 месяца назад

    Hi Hans, thank you for your review. I am looking for a build system for some projects I am working on and I am still exploring options, so your videos are definitely very helpful. May I ask you what your opinion is about Bazel ?

    • @KeaSigmaDelta
      @KeaSigmaDelta  3 месяца назад

      I haven't had a chance to try out Bazel yet. I'm planning to try that one out next...

  • @Henrix1998
    @Henrix1998 2 месяца назад +1

    Trying to use cmake like it is meant to be used? But there's so many different ways to do the same thing

    • @KeaSigmaDelta
      @KeaSigmaDelta  2 месяца назад +1

      Yes, having many ways to do the same thing can make it hard to decide which one is best. Still, if you try to use CMake as if it's make, then you're going to get frustrated.

  • @yash1152
    @yash1152 2 месяца назад

    how does one configure cmake for different languages?

    • @KeaSigmaDelta
      @KeaSigmaDelta  2 месяца назад

      I've never used it for anything other than C/C++, but you can list the languages you want to use in the project() command:
      cmake.org/cmake/help/latest/command/project.html#command:project
      And there's also the enable_language() function:
      cmake.org/cmake/help/latest/command/enable_language.html

    • @yash1152
      @yash1152 2 месяца назад

      @@KeaSigmaDelta thanks alot for sharing the links as well :)

  • @yash1152
    @yash1152 2 месяца назад

    i'll be using it with nixos... so, i dont need to fetch things... lets see which one will fit

  • @bennguyen1313
    @bennguyen1313 Месяц назад

    I understand you can configure Cmake to output a Ninja file...
    cmake -G Ninja /path/to/source/directory
    But what about meson..
    meson setup builddir --backend=ninja
    I'm interested in doing simple graphics using cntools/rawdraw (by cnlohr)

    • @KeaSigmaDelta
      @KeaSigmaDelta  Месяц назад

      Meson uses Ninja by default, provided that it's installed. It's documented on this page: mesonbuild.com/Builtin-options.html (Just search for Ninja).

  • @shrikamath
    @shrikamath 6 месяцев назад +2

    With vcpkg I see CMake ecosystem is better, It's easier to integrate with third party libs, otherwise meson is better.

    • @KeaSigmaDelta
      @KeaSigmaDelta  6 месяцев назад +2

      Interesting. I prefer to use CMake without any third-party package manager. I don't have enough experience with Meson to say which one I think is better.

  • @Vo0idsEmbrace
    @Vo0idsEmbrace 6 месяцев назад +7

    Cmake sucks

    • @KeaSigmaDelta
      @KeaSigmaDelta  6 месяцев назад +5

      I used to think so too...

    • @default2043
      @default2043 5 месяцев назад +6

      CMake can be challenging at times, especially when dealing with third-party libraries, as each developer and company has their own way of defining things. However, in general, I don't think CMake is that bad. We also need to remember that CMake handles a lot of complexities, and the C/C++ ecosystem is quite complicated by itself as is.

    • @KeaSigmaDelta
      @KeaSigmaDelta  5 месяцев назад +2

      @@default2043 Agreed. Things do indeed get complex when you start interacting with other humans and/or their creations. That goes beyond programming...

    • @haroldcruz8550
      @haroldcruz8550 4 месяца назад +2

      A bad workman always blames his tools