3 ms·
Why do many C/C++ projects have both Meson and Ninja commands in their install instructions? Shouldn't only one be necessary?
by hackerbrother 4y ago
Why do many C/C++ projects have both Meson and Ninja commands in their install instructions? Shouldn't only one be necessary?
- Un1corn 4y agoMeson generates Ninja files. At first, you were supposed to run ninja after Meson yourself but modern Meson support meson compile which calls ninja under the hood
- hackerbrother 4y agoYup, and Wikipedia says it very clearly too. Thanks! > In contrast to Make, Ninja lacks features such as string manipulation, as Ninja build files are not meant to be written by hand. Instead, a "build generator" should be used to generate Ninja build files. Gyp, CMake, Meson, and gn[9] are popular build management software tools which support creating build files for Ninja.
- bonzini 4y agoMeson looks at the system (finds compilers and dependencies, mostly) and prepares a build directory with a build.ninja file in it (and possibly other files). Once the build directory is ready you compile with ninja, there is a wrapper "meson compile" but it's kinda pointless because it's longer and doesn't provide any extra functionality.
- germandiago 4y agomeson compile will invoke the backend used.