meson VS doctest

Compare meson vs doctest and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
meson doctest
110 19
5,246 5,553
1.8% 1.6%
9.8 0.0
2 days ago about 1 month ago
Python C++
Apache License 2.0 MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

meson

Posts with mentions or reviews of meson. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-22.
  • Which Build Tool for a Bootstrappable Project?
    1 project | news.ycombinator.com | 2 Apr 2024
  • Building Waybar fails
    1 project | /r/hyprland | 26 Nov 2023
    The Meson build system Version: 1.2.3 Source dir: /home/patrik/workspace/Waybar Build dir: /home/patrik/workspace/Waybar/build Build type: native build Project name: waybar Project version: 0.9.24 C compiler for the host machine: cc (gcc 13.2.0 "cc (Debian 13.2.0-5) 13.2.0") C linker for the host machine: cc ld.bfd 2.41 C++ compiler for the host machine: c++ (gcc 13.2.0 "c++ (Debian 13.2.0-5) 13.2.0") C++ linker for the host machine: c++ ld.bfd 2.41 Host machine cpu family: x86_64 Host machine cpu: x86_64 Compiler for C++ supports link arguments -lc++fs: NO Compiler for C++ supports link arguments -lc++experimental: NO Compiler for C++ supports link arguments -lstdc++fs: YES Program git found: YES (/usr/bin/git) WARNING: You should add the boolean check kwarg to the run_command call. It currently defaults to false, but it will default to true in future releases of meson. See also: https://github.com/mesonbuild/meson/issues/9300 Has header "filesystem" : YES Checking if "nl_langinfo with _NL_TIME_WEEK_1STDAY, _NL_TIME_FIRST_WEEKDAY" : links: YES Run-time dependency threads found: YES Found pkg-config: /usr/bin/pkg-config (1.8.1) Run-time dependency fmt found: YES 9.1.0 Run-time dependency spdlog found: YES 1.12.0 Run-time dependency wayland-client found: YES 1.22.0 Run-time dependency wayland-cursor found: YES 1.22.0 Run-time dependency wayland-protocols found: YES 1.32 Run-time dependency gtkmm-3.0 found: YES 3.24.8 Run-time dependency dbusmenu-gtk3-0.4 found: YES 16.04.0 Run-time dependency gio-unix-2.0 found: YES 2.78.1 Run-time dependency jsoncpp found: YES 1.9.4 Run-time dependency sigc++-2.0 found: YES 2.12.1 Found CMake: /usr/bin/cmake (3.27.7) Run-time dependency libinotify found: NO (tried pkgconfig and cmake) Run-time dependency epoll-shim found: NO (tried pkgconfig and cmake) Run-time dependency libinput found: YES 1.23.0 Run-time dependency libnl-3.0 found: YES 3.7.0 Run-time dependency libnl-genl-3.0 found: YES 3.7.0 Run-time dependency upower-glib found: YES 1.90.2 Run-time dependency libpipewire-0.3 found: YES 0.3.85 Run-time dependency playerctl found: YES 2.4.1 Run-time dependency libpulse found: YES 16.1 Run-time dependency libudev found: YES 252 Run-time dependency libevdev found: YES 1.13.1 Run-time dependency libmpdclient found: YES 2.20 Run-time dependency xkbregistry found: YES 1.6.0 Run-time dependency jack found: YES 0.126.0 Run-time dependency wireplumber-0.4 found: YES 0.4.15 Library sndio found: YES Checking for function "sioctl_open" with dependency -lsndio: YES Run-time dependency gtk-layer-shell-0 found: YES 0.8.1 Run-time dependency systemd found: YES 252 Computing int of "__cpp_lib_chrono" : 201611 Configuring waybar.service using configuration Run-time dependency cava found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency cava Executing subproject cava cava| Project name: cava cava| Project version: 0.9.1 cava| C compiler for the host machine: cc (gcc 13.2.0 "cc (Debian 13.2.0-5) 13.2.0") cava| C linker for the host machine: cc ld.bfd 2.41 cava| Has header "iniparser.h" : NO cava| Has header "iniparser4/iniparser.h" : NO Message: cava is not found. Building waybar without cava subprojects/cava-0.9.1/meson.build:65:3: ERROR: Problem encountered: iniparser library is required A full log can be found at /home/patrik/workspace/Waybar/build/meson-logs/meson-log.txt WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
  • How to find a list of all gcc errors/warnings?
    1 project | /r/C_Programming | 4 Oct 2023
    As it happens, I recently landed a PR in meson to add a clang-like Weverything mode that includes all of that, so you can get a minimal list of more or less all GCC warnings, organized by version, from the meson source here: https://github.com/mesonbuild/meson/blob/710a753c78077220b13a9f7e999dcdb61339efb1/mesonbuild/compilers/mixins/gnu.py
  • Makefile Tutorial
    5 projects | news.ycombinator.com | 22 Sep 2023
    Came here to post the same. The answer for How to build software? is Meson[1] for C and C++ and also other languages. Works well on Windows and Mac, too.

    I’ve written a small Makefile to learn the basic and backgrounds. Make is fine. But the next high-level would have been Autotools, which is an intimidating and weird set of tools. Most new stuff written in C/C++ use now Meson and it feels sane.

    [1] https://mesonbuild.com

  • CMake x make?
    2 projects | /r/C_Programming | 20 Sep 2023
    If you are very fortunate, you'll be able to choose something else. I like meson myself: it looks a bit like python, it's popular, small, simple, well-documented, easy to install and update, and it works well everywhere.
  • C++ Papercuts
    3 projects | news.ycombinator.com | 28 Aug 2023
    I suggest changing the build tool. Meson improved C and C++ a lot:

    https://mesonbuild.com/

    The dependency declaration and auto-detection is nice. But the hidden extra is WrapDB, built-in package management (if wanted):

        https://mesonbuild.com/Wrap-dependency-system-manual.html
  • A Modern C Development Environment
    7 projects | news.ycombinator.com | 10 Aug 2023
    > C's only REAL problem (in my opinion) which is the lack of dependency management. Most everything else can be done with a makefile and a half decent editor.

    Care to hear about our lord and saviour Meson?

    Both of your quoted problems are mutually incompatible: dependency management isn't the job of the compiler, it's a job for the build or host system. If you want to keep writing makefiles, be prepared to write your own `wget` and `git` invocations to download subprojects.

    Meanwhile, Meson solves the dependency management problem in a way that makes both developers and system integrators/distributions happy. It forces you to make a project that doesn't have broken inter-file or header dependency chains and cleans up all the clutter and cruft of a makefile written for any non-trivial project, while making it trivial to integrate other meson projects into your build, let other people integrate your project into theirs, and provides all of the toggles and environment variables distribution developers need to package your library properly. You can really have your cake and eat it too.

    https://mesonbuild.com/

  • cgen: another declarative CMake configuration generator
    7 projects | /r/cpp | 24 Jun 2023
    Other people going down this route seem to end up writing cmake replacements instead. I'm thinking of something like meson here except that meson never intended to transpile to cmake.
  • Makefile vs Cmake - Objective comparison ?
    2 projects | /r/embedded | 11 Jun 2023
  • Installer script for CMake, Ninja, and Meson
    4 projects | /r/bash | 1 Jun 2023
    I thought I would share my custom installer script for the latest GitHub versions of CMake, Ninja, and Meson.

doctest

Posts with mentions or reviews of doctest. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-05-07.
  • Unit testing tool suggestions
    2 projects | /r/learnprogramming | 7 May 2023
    I have never used "tools" for unit-tests, only web sites that show the results of the tests or code coverage. For C++ I prefer https://github.com/doctest/doctest but most companies I worked for use Catch2.
  • Question about Doctest.h
    1 project | /r/learnprogramming | 5 Feb 2023
    Do the README and tutorial not explain it well enough? It's a framework for automated unit testing.
  • Doctest – C++ Testing Framework
    1 project | news.ycombinator.com | 4 Feb 2023
  • Memory Safety in the D Programming Language (Part 2 of N)
    2 projects | /r/programming | 8 Oct 2022
    This is, honestly, super easy to get going. Nowadays you have a ton of libraries and more-than-decent build systems. With Meson/CMake and Conan/Vcpkg I can set up a project with testing in 3 minutes. Also, I think that at the end of the day you want your tests to live somewhere else. But if you want to embed them, you also have https://github.com/doctest/doctest.
  • how can I improve my connect4 board class?
    1 project | /r/cpp_questions | 28 May 2022
    Write some tests. They can find bugs early and give you confidence that your code works so far. That doesn't have to be anything fancy, e.g. with doctest:
  • Testing framework Catch2 3.0 final released
    3 projects | /r/cpp | 17 May 2022
    Keep in mind https://github.com/doctest/doctest/issues/554. Also, doctest lacks: - Matchers - Data generators - Benchmarking - ...
  • Check if my code meets the requirements?
    1 project | /r/learnprogramming | 30 Mar 2022
    Your requirements can easily simulated on paper (like increase the speed once, twice, ...), then translated to unit-tests with a framework like https://github.com/doctest/doctest.
  • The Lisp Curse
    11 projects | news.ycombinator.com | 25 Mar 2022
    I like working in C++, after a decade of working in Java, Python, Javascript and Clojure, I find working in C++ (which I learned before these other languages) to be quite fun and pleasant, at least with relatively modern C++.

    I've been, on and off, working on a little toy game engine, for a few years. Its a mix of keeping up with C++ advancements, learning various concepts like physically based rendering, and just the fun of crafting a big project, with no constraints other than my time and ability, no deadlines, no expectation of releasing anything. Its cathartic and enjoyable. I really do enjoy it.

    Last September, I got frustrated with something I was working on in a more serious capacity. It was some server software, it responded to HTTP requests, it accessed third party services over HTTP and Websockets, it talked to a Postgres database. Overall it was an event driven system that transformed data and generated actions that would be applied by talking to third party services. The "real" version was written in Clojure and it worked pretty well. I really like Clojure, so all good.

    But because I was frustrated with some things about how it ran and the resources it took up, I wondered what it would be like if I developed a little lean-and-mean version in C++. So I gave it a try as a side project for a few weeks. I used doctest[1] for testing, immer[2] for Clojure-like immutable data structures, [3] lager for Elm-like application state and logic management, Crow[4] for my HTTP server, ASIO[5] and websocketpp[6] for Websockets, cpp-httplib[7] as a HTTP client and PGFE[8] for Postgres, amongst some other little utility libraries. I also wrote it in a Literate Programming style using Entangled[9], which helped me keep everything well documented and explained.

    For the most part, it worked pretty well. Using immer and lager helped keep the logic safe and to the point. The application started and ran very quickly and used very little cpu or memory. However, as the complexity grew, especially when using template heavy libraries like lager, or dealing with complex things like ASIO, it became very frustrating to deal with errors. Template errors even on clang became incomprehensible and segmentation faults when something wasn't quite right became pretty hard to diagnose. I had neither of these problems working on my game engine, but both became issues on this experiment. After a few weeks, I gave up on it. I do think I could have made it work and definitely could go back and simplify some of the decisions I made to make it more manageable, but ultimately, it was more work than I had free time to dedicate to it.

    So my experience was that, yes, you can write high level application logic for HTTP web backends in C++. You can even use tools like immer or lager to make it feel very functional-programming in style and make the application logic really clean. Its not hard to make it run efficiently both in terms of running time and memory usage, certainly when comparing to Clojure or Python. However, I found that over all, it just wasn't as easy or productive as either of those languages and I spent more time fighting the language deficiencies, even with modern C++, than I do when using Clojure or Python.

    I think I would think very long and hard before seriously considering writing a web backend in C++. If I had the time, I'd love to retry the experiment but using Rust, to see how it compares.

    [1] https://github.com/doctest/doctest

    [2] https://github.com/arximboldi/immer

    [3] https://github.com/arximboldi/lager

    [4] https://github.com/CrowCpp/crow

    [5] https://think-async.com/Asio/

    [6] https://www.zaphoyd.com/projects/websocketpp/

    [7] https://github.com/yhirose/cpp-httplib

    [8] https://github.com/dmitigr/pgfe

    [9] https://entangled.github.io/

  • C++17 python like print function
    4 projects | /r/embedded | 9 Mar 2022
    For stuff like this which is very easy to test (very predefined input vs output), I highly suggest using some testing framework. Catch2 is great, but there is also doctest and good ole googletest. If you do this, it would also be a great intro to CI, where you do some plumbing on github or gitlab where every commit causes a build to happen on their servers and run through the unit tests, and if it passes it gets merged into master.
  • How to unit test
    8 projects | /r/cpp_questions | 9 Feb 2022
    doctest is my favorite framework. Really simple to use, header only, supports compile-time tests, lots of features and it works well with cmake.

What are some alternatives?

When comparing meson and doctest you can also consider the following projects:

CMake - Mirror of CMake upstream repository

Catch - A modern, C++-native, test framework for unit-tests, TDD and BDD - using C++14, C++17 and later (C++11 support is in v2.x branch, and C++03 on the Catch1.x branch)

ninja - a small build system with a focus on speed

Google Test - GoogleTest - Google Testing and Mocking Framework

SCons

Google Mock

Bazel - a fast, scalable, multi-language and extensible build system

Boost.Test - The reference C++ unit testing framework (TDD, xUnit, C++03/11/14/17)

cmake-init - The missing CMake project initializer

CppUTest - CppUTest unit testing and mocking framework for C/C++

BitBake - The official bitbake Git is at https://git.openembedded.org/bitbake/. Do not open issues or file pull requests here.

Unity Test API - Simple Unit Testing for C